我在 Mac 上尝试克隆我在另一台机器上使用私人 github 帐户创建的存储库。
我完成了典型的 ssh 关键步骤,但无论出于何种原因,我仍然无法使用 ssh 进行克隆。
当我跑步时:
ssh -T git@github.com-<private account>
Run Code Online (Sandbox Code Playgroud)
我明白了
Hi <private account>! You've successfully authenticated, but GitHub does not provide shell access.
Run Code Online (Sandbox Code Playgroud)
我的~/.ssh/config
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
Host github.com-<private account>
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_****
IdentitiesOnly yes
Run Code Online (Sandbox Code Playgroud)
当我克隆时:
Cloning into 'my repo'...
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)
我没有从以下方面得到任何不寻常的信息:
ssh -v git@github.com-<private account>
Run Code Online (Sandbox Code Playgroud)
该存储库是使用 git 1.9.1 创建的,而我尝试使用 2.11.0 进行克隆。这会有所作为吗?
Git 版本的差异应该不重要。
但如果您想使用正确的 ssh 身份验证进行克隆,则需要使用正确的 ssh URL:
git clone github.com-<private account>:<auser>/<aproject.git>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1309 次 |
| 最近记录: |