有人看到这个错误并知道该怎么做吗?
我正在使用终端,我在根,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.
当前回答
这对我很有用
有2个选项在github - HTTPS/SSH
我错误地选择了SSH,因此出现了错误-_-
切换到HTTPS,然后复制url再次尝试:)
其他回答
如果您已经创建了SSH密钥,但仍然报错,这是因为您需要给用户读写要克隆到的文件夹的权限。sudo chmod 777 <your_folder_name_here>"。 当然,这是在生成SSH密钥之后,仍然会得到这个错误。希望这对未来的用户有所帮助。
Edit
如果你使用git bash,在Windows中使用admin来添加
如果您正在使用GitHub for Mac UI,请检查首选项以确保您已登录。
我在ssh代理中加载了2个Github身份文件。我的个人钥匙和另一把客户项目的钥匙。
我删除了引起混乱的关键:
Ssh-add -d id_rsa_github_somekey . sh
允许对密钥(标识)进行写访问,然后单击“添加密钥”
如果在Windows上,请检查通过SSH使用Github中的更多详细信息。
如果您将ssh访问更改为https访问远程存储库,问题就解决了:
git remote set-url origin https_link_to_repository
git push -u origin master