[Solved-5 Solutions] Pushing to Git returning Error Code 403 fatal: HTTP request failed - git
Error Description:
Solution 1:
Github give the idea it supports ssh way to read & write the repo, whereas https way also displayed 'Read & Write'.
- Now you need to change your repo config on your PC to ssh way:
1. Edit .git/config
file under your repo directory
2. Find url=
entry under section [remote "origin"]
3. Change it from url=https://MichaelDrogalis@github.com/derekerdmann/lunch_call.git
to url=ssh://git@github.com/derekerdmann/lunch_call.git.
ie, change all the texts before @ symbol to ssh://git
4. Save config
file and quit. You can use git push origin master
to sync your repo on GitHub
Solution 2:
- To login using
https protocol,
you should first set your authentication credential to the git Remote URI:
- Now you'll be asked for a password when try to
git push.
- In fact, this is on the http authentication format. Now you have to set a password :
- You should be aware that your github password will be stored in plaintext in your .git directory, which is undesirable.
Solution 3:
- On behalf of editing
.git/config
file manually, you can usegit remote set-url
command. - In your case it should be:
Solution 4:
- Edit
.git/config
file under your repo directory - Find
url=
entry under section[remote "origin"]
- Change it from
url=https://github.com/rootux/ms-Dropdown.git
tohttps://USERNAME@github.com/rootux/ms-Dropdown.git
- Where
USERNAME
is your github user name
Solution 5:
- When permission denied 403 error while using ssh(according to Xiao) or http urls you can also try these commands
With administrator rights