我想通过 git 将一些源代码克隆到我的服务器,所以:
root@wemet:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
79:ff:5d:07:9f:64:a7:d2:3f:81:0c:4d:ac:54:4e:fe root@wemet
The key's randomart image is:
+--[ RSA 2048]----+
| oo |
| .+o |
| . +o |
| . o .. |
| S . o oE.|
| . . +o=o|
| o o.=|
| o +o|
| . +|
+-----------------+
root@wemet:~# git clone ssh://git@git.cloudbees.com/foretribe/wetest.git
Cloning into 'wetest'...
The authenticity of host 'git.cloudbees.com (54.235.125.211)' can't be establis
ed.
ECDSA key fingerprint is 39:fe:eb:80:cd:56:bb:42:0e:bc:77:85:2c:9b:14:d2.
Are you sure you want to continue connecting (yes/no)? no
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
root@wemet:~#
您可以看到 ssh-keygen 生成带有指纹的文件 79:ff:5d:07:9f:64:a7:d2:3f:81:0c:4d:ac:54:4e:fe 但是当我想申请git命令文件指纹为:39:fe:eb:80:cd:56:bb:42:0e:bc:77:85:2c:9b:14:d2
git 命令应该检索它应该存储在 /root/.ssh/ 的默认 ssh 密钥文件,为什么 ssh 会获取其他文件?在哪儿?
这意味着它们是完全不同的文件!!!