【发布时间】:2017-12-10 17:22:09
【问题描述】:
我需要访问(克隆)GitHub 上的一个私有存储库,该存储库属于我无法与之通信的开发人员。我已经获得了公钥和私钥(我猜它们可能是特定存储库的部署密钥?)
运行以下终端命令后:
git clone git@github.com:theirusername/reponame.git
我收到以下错误:
Cloning into 'reponame'...
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
开发人员还在带有密钥的 README 中包含以下注释: 开发者说明(将敏感信息替换为“x”)
===============
"This SSH public/private keypair allows full access to the server.
DO NOT GIVE THESE FILES TO ANYONE THAT YOU DON'T WANT ACCESSING YOUR ENTIRE SERVER AND ASSOCIATED SERVICES.
- The SSH port is XXXXX.
- There is no passphrase on the keys.
- The keys allow access to two users: `xxx` (standard privs) and `xxx` (for sudo and su-ing to root)
- These keys also allow access to the GitHub repository: github.com/theirusername/reponame.git"
我已经尝试将公钥添加到我的 Github 帐户(在设置 --> SSH 和 GPG 密钥下)。这似乎对问题没有帮助。
我确定这里有一些基本的东西我没有掌握。我需要公钥和私钥来访问回购吗?如果是这样,我必须在哪里注册他们每个人?任何帮助将不胜感激。
【问题讨论】: