Permission denied (publickey). fatal: The remote end hung up unexpectedly while pushing back to git

配置完git ssh后 

ssh -T [email protected] 返回正常结果

Hi ****! You've successfully authenticated, but GitHub does not provide shell access

但是在push 的时候出现 如下错误

Permission denied (publickey). fatal: The remote end hung up unexpectedly while pushing back to git repository [duplicate]


解决方法:
.git/config文件将
url = https://@github.com/linglongwang/Demo.git
改为
url = https://[email protected]/linglongwang/Demo.git

再 git push 成功!

stackoverflow 
http://stackoverflow.com/questions/7065257/permission-denied-publickey-fatal-the-remote-end-hung-up-unexpectedly-while

你可能感兴趣的:(github,git,stackoverflow)