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

后端 未结 30 1669
轻奢々
轻奢々 2020-11-22 04:52

I was able to clone a copy of this repo over HTTPS authenticated. I\'ve made some commits and want to push back out to the GitHub server. Using Cygwin on Windows 7 x64.

30条回答
  •  花落未央
    2020-11-22 05:21

    I just got the same problem and just figured out what's cause.

    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:

    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=git@github.com/derekerdmann/lunch_call.git. that is, change all the texts before @ symbol to ssh://git
    4. Save config file and quit. now you could use git push origin master to sync your repo on GitHub

提交回复
热议问题