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:
- edit .git/config file under your repo directory
vim .git/config
2.find url=entry under section [remote "origin"]
git remote rm origin
git remote add origin [email protected]:eduOSS/firstGitpra.git
一般只有第一次遠程纔會繼續出現以下錯誤,因爲publickey只需要設置一次就行了
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
answer:
I had to add my public key to github. https://help.github.com/articles/generating-ssh-keys
when I walked through the toturial at the ent of step 2 I occured this:
Could not open a connection to your authentication agent.
so I find the answer:
I should to start the ssh-agent
exec ssh-agent bash
Finally! After finishing the torurial I got it: