Pushing to Git returning Error Code 403 fatal: HTTP request failed

Question:

I was able to clone a copy of this repo over HTTPS authenticated. I’ve made some commits and want to push them back out to the GitHub server but getting below error.

Answer:

To definitely be able to login using https protocol, you should first set your authentication credential to the git Remote URI:

Then you’ll be asked for a password when trying to git push.

In fact, this is on the http authentication format. You could set a password too:

You should be aware that if you do this, your github password will be stored in plaintext in your .git directory, which is obviously undesirable.

Leave a Reply

Close Menu