配置完git ssh后
ssh -T git@github.com 返回正常结果
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://username@github.com/linglongwang/Demo.git
再 git push 成功!
stackoverflow
解决Git Push权限拒绝问题
本文介绍了一种解决在使用Git进行代码推送时遇到的权限拒绝错误的方法。通过修改.git/config文件中的URL格式,从https://@github.com/替换为https://username@github.com/,成功解决了push失败的问题。

被折叠的 条评论
为什么被折叠?



