首先呢,我已经弄好了ssh的密钥,ssh -T git@github.com是可以的,返回:
Hi xxxxxx! You've successfully authenticated, but GitHub does not provide shell access.
但是,当我想要git push的时候,总是失败,提示是:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
FATAL Something's wrong. Maybe you can find the solution here: xxxxxxxxxxxx
请问这是什么情况,
我执行的是
git remote add origin git@github.com:xxxxxxx/test.git
git push -u origin master
我也遇到这个问题了,并且记录了解决方式
http://youcanping.cn/2017/12/20/ssh-Permission-denied/
5. 看本地的.git/config设置的仓库url地址和github使用的链接地址是否一致如下图,如use https,则url需要用https的仓库地址,我的就是这个问题。