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:
- Manually edit
.git/config
file under your repo directory. Findurl=
entry under section[remote "origin"].
Change all the texts before@
symbol tossh://git
. Saveconfig
file and quit. now you could usegit push origin master
to sync your repo on GitHub -
Another solution is just use shell command:
git remote set-url origin ssh://git@github.com/username/projectName.git
No comments:
Post a Comment