Github 添加SSH后私有回购的权限被拒绝(公钥)

Github 添加SSH后私有回购的权限被拒绝(公钥),github,ssh-keys,Github,Ssh Keys,我已经成功添加了SSH密钥,我可以使用SSH克隆其他公共repo,但不能克隆私有repo!它显示了这个错误: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 可能的原因是ssh密钥或目录具有错误的权限。.ssh目录的正确权限应为70

我已经成功添加了SSH密钥,我可以使用SSH克隆其他公共repo,但不能克隆私有repo!它显示了这个错误:

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

可能的原因是ssh密钥或目录具有错误的权限。.ssh目录的正确权限应为
700
,公钥应为
644
,私钥应为
600

要更新ssh密钥和目录,假设
.ssh
目录位于
~/.ssh

  • chmod 700~/.ssh
  • chmod 600~/.ssh/*
  • chmod 644~/.ssh/*.pub

你可能需要在这些命令前面加上
sudo

你能告诉我,如何解决这个问题吗?我添加了一个逐步解决方案担心延迟重播,我已经尝试了,但没有工作,它显示了相同的信息,还请注意,我正在使用windows!