No anonymous write access

From yesterday afternoon every time when I try to commit

git push origin main:main
remote: No anonymous write access.
fatal: Authentication failed for “repo name”

why this is happening?
I’m committing to my own repositories. My git account is logged in and everything is okay. But why this is happening?
Are there any solutions for it?


I have the same issue for last few hours.

1 Like

Having the same problem too.

1 Like

I’ve had the same issue too since upgrading to version 1.62.2. Searching for a solution led me here.
So far reinstalling and resetting configurations don’t seem to work.

But manual push from CLI using a personal access token works.

Indeed, that works for me as well. Thanks for the tip.

You’re welcome, @krikke01

Also, downgrading to version 1.62.1 seems to work.

Having the exact same issue, havent changed anything and it was working before, i’ll try downgrading to 1.62.1 and hope it works

EDIT: Can confirm 1.62.1 works, and also on 1.62.2 if you connect to a WSL session it works

I got this message, so just follow the instructions

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see Token authentication requirements for Git operations | The GitHub Blog for more information.

I have also faced this problem. I think, It is a vs code issue. I have tried using pycharm. It works fine.

1 Like

Having the same problem but it seems to be a vs code issue.

I have the same problem, but not only on vscode, all of a sudden I’m unable to push through the terminal, only on repositories which I have clone with through ssh

1 Like

I just solved this problem.

1st Step enable two-factor authentication

  • Go to GitHub Account settings
  • Account Security
  • Enable Two-factor authentication

2nd step Personal access tokens

  • Go to GitHub Developer settings
  • Personal access tokens then generate token

Important notes

  1. Every time when we need to use a GitHub password, we must need to use Personal access tokens Instead of the git password.
  2. Personal access tokens need to save it in a text file in your machine because only one time we see the access token.

I’m using Linux, so for the git push, I’m running this command sudo git push Instead of git push.


Two security warnings here: :warning:

Don’t use sudo for Git. It shouldn’t help unless something’s fundamentally wrong with the ownership/access rights for your repository (and in that case, fix those), but running things with root privileges that don’t need them is always an unnecessary risk.

It’s highly recommended to save them in encrypted form, e.g. in a password manager or using GPG. Otherwise anyone who can read the text file can push to your repositories.


Just run this command on your vs code terminal: git config --global credential.helper cache
then run git push …


not working at all.
everything working fine on my terminal but just seems an issue in VS Code.
and a big hurdle is to paste the authentication code each time.

1 Like

This post was flagged by the community and is temporarily hidden.

Having the same problem too

1 Like

Facing same issue :frowning:

1 Like
1 Like

Yahooo! Finally an Issue resolved

So there are a few steps you can try and hopefully, it would be fixed for you too.

Open your Settings In VS CODE.

  1. Open settings from the left bottom corner (Settings icon) or press CTRL +,
  2. type Authentication in the search option, it will show something like this.
  3. You need to uncheck Git: Terminal Authentication. (e.g)
  4. Only Github: Github Authentication should be checked.
  • Now you need to close the opened terminal (if any). open your new terminal and try with git commands.

on my end, everything is working fine. hope this works for you too. :slight_smile:

1 Like