Home > Mobile >  Git authentication with GitHub fails, remote: No anonymous write access
Git authentication with GitHub fails, remote: No anonymous write access

Time:11-17

I am unable to authenticate with GitHub using Git, the following error appears:

remote: remote: No anonymous write access.
fatal: Authentication failed for ...

CodePudding user response:

I had the same issue, from within Visual Studio Code.

Git pushing directly from the terminal worked, but the exact same command from the terminal within Visual Studio Code failed because of missing remote anonymous write access.

As it turned out, this was a problem with Visual Studio Code 1.62.2 for Linux. Reverting to 1.62.1 or 1.61.2 solved it.

CodePudding user response:

I had the same issue while coding from an old repository on a new machine and trying to push. I gave my username and password, but I was unable to authenticate.

It looks like I did "git clone" via HTTPS for this repository (didn't remember). On my new machine, I did configure SSH, but not HTTPS. That's why I got this error.

I resolved it by generating a new token in GitHub:

  • Follow the instructions for creating a personal access token (PAT)
  • When you have your new token, copy it (keep it somewhere you won't see it any more bit you'll need it next time you want to push your repository).
  • when you "git push", enter your username and, in place of the password, paste your new personal token
  • Related