git连接服务器ssh key

Please make sure you have the correct access rights
and the repository exists.

[ename@localhost work]$ git config --global user.name "xxx"
[ename@localhost work]$ git config --global user.email "[email protected]"
[ename@localhost work]$ ssh-keygen -t rsa -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/ename/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/ename/.ssh/id_rsa.
Your public key has been saved in /home/ename/.ssh/id_rsa.pub.
The key fingerprint is:
75:17:a5:59:b7:6b:86:75:65:d7:a6:16:7d:22:32:6a [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
.....
+-----------------+

[ename@localhost .ssh]$ vim /home/ename/.ssh/id_rsa.pub
复制里面的内容
登陆你的账户,进入设置SSH KEY  将复制的内容 添加到新的KEY

猜你喜欢

转载自blog.csdn.net/feifeidehuishoude/article/details/81222080