Skip to main content "Failed authenticate to git remote" error message went pushing from VSCode to Github. Why? : r/github

"Failed authenticate to git remote" error message went pushing from VSCode to Github. Why?

I am running into this error when I try to push my code from VSCode to Github. I made a new repo, and then pasted the URL of the repo into VSCode to push my work, but this message appears when I try to do so. I have not run into this problem in the past so I am unsure of what to do. I have searched online and people say I may need my own personal token / password, but they say I'd only need that if I set up 2-factor authentication, which I have not done. What should I do?

I had to add my files into the repo via upload, but then none of my commit messages appear. This method is also a lot slower...

Save time securing your code using AI agents — Try the free beta today
Thumbnail image: Save time securing your code using AI agents — Try the free beta today
Sort by:
Best
Open comment sort options

Starting in March 2023, GitHub started mandating two-factor. You may potentially have to set it up before you can do anything else.

https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa/about-mandatory-two-factor-authentication

I did this, but still get the same message when I try to push with HTTPS: "failed to authenticate to git remote:", not sure what to do. I don't want to rely on uploading files manually to Github as pushing from VSCode is easier in the long run.

More replies
More replies

Sounds like you might be using https instead of ssh

Yes that was the plan, I wanted to use https just because it’s faster.

More replies
More replies