我按照 https://help.github.com/articles/generating-ssh-keys 上的说明进行操作,并输入:
我收到了消息。
当我尝试使用ssh克隆一个代码仓库时。
如果我输入 < /p>
ssh -T git@github.com
我收到了消息。
Hi username! You've successfully authenticated, but GitHub does not
# provide shell access.
当我尝试使用ssh克隆一个代码仓库时。
git clone ssh://github.com/username/repository.git
我明白了
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
如果我输入 < /p>
ssh-add -l
我看到有3个密钥,其中一个与我的电子邮件地址相关联(k1),另外2个在~/.ssh/id_rsa (RSA)
中(k2和k3)。
密钥k3与k1相同。
如果我输入
ssh -vT git@github.com
一切都很好...唯一让我思考的是这一行
debug1: Remote protocol version 2.0, remote software version libssh-0.6.0
debug1: no match: libssh-0.6.0
cd ~/.ssh/
和ssh-add <name-of-key>
,然后才能进行克隆。 - Eric