在 Linux 服务器上,我已成功使用 添加了 ssh 密钥,将其添加到使用ssh-keygen中可用的密钥列表中,然后将该公钥添加到我组织的私有存储库中的部署密钥部分。该部署密钥还具有写入权限。ssh-agentssh-add ~/.ssh/my_new_private_key
但是,当我使用 SSH 链接运行时git clone,出现以下错误:
# git clone git@github.myorg/myprivaterepo.git
Cloning into 'myprivaterepo'...
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
我缺少什么?我已按照此处的指南https://docs.github.com/en/developers/overview/managing-deploy-keys#deploy-keys成功添加部署密钥,但尝试克隆时没有成功。
确保:
ssh -Tv git@github.myorg工作,这意味着它显示欢迎消息git@github.myorg:<me>/myprivaterepo.git' 。:git@github.myorg