有人看到这个错误并知道该怎么做吗?
我正在使用终端,我在根,GitHub存储库存在,我不知道现在该做什么。
> git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
有人看到这个错误并知道该怎么做吗?
我正在使用终端,我在根,GitHub存储库存在,我不知道现在该做什么。
> git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
当前回答
允许对密钥(标识)进行写访问,然后单击“添加密钥”
如果在Windows上,请检查通过SSH使用Github中的更多详细信息。
其他回答
可能您的ssh-agent未启用 你可以试试
下载
http://git-scm.com/
安装它 使ssh-agent
C:\Program Files\Git\cmd
start-ssh-agent
我在ssh代理中加载了2个Github身份文件。我的个人钥匙和另一把客户项目的钥匙。
我删除了引起混乱的关键:
Ssh-add -d id_rsa_github_somekey . sh
我在AWS CodeCommit上也遇到了同样的问题。所有人都在一台笔记本电脑上工作,但另一台却没有。解决方案是在AWS配置部分的.ssh/config中删除'PreferredAuthentications publickey'行。
同样在ubuntu中,即使在BitBucket的设置中已经输入了SSH密钥,我还是遇到了这个问题。原因是,我尝试了以下几点:
sudo git push origin master
不知道为什么,但它解决了使用
git push origin master
没有使用sudo。
如果您正在使用GitHub for Mac UI,请检查首选项以确保您已登录。