Sunday, September 30, 2012

Pushing to Git returning Error Code 403 fatal

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

Why:
Github seems only supports ssh way to read&write the repo, although https way also displayed 'Read&Write'. So you need to change your repo config on your PC to ssh way:

Solution:
  1.  Manually edit .git/config file under your repo directory. Find url=entry under section [remote "origin"]. Change all the texts before @ symbol to ssh://git. Save config file and quit. now you could use git push origin master to sync your repo on GitHub
  2.  Another solution is just use shell command:
git remote set-url origin ssh://git@github.com/username/projectName.git

No comments:

Post a Comment