码迷,mamicode.com
首页 > Windows程序 > 详细

linux 或者windows 设置git的ssh

时间:2020-03-08 21:51:44      阅读:83      评论:0      收藏:0      [点我收藏+]

标签:led   war   email   print   ann   rom   --   ted   global   

[root@iZwz94d6ox6sdexe984lpuZ ~]# git config --global user.name "yindongzi"
[root@iZwz94d6ox6sdexe984lpuZ ~]# git config --global user.email "350343754@qq.com"
[root@iZwz94d6ox6sdexe984lpuZ ~]# cd /root/.ssh
[root@iZwz94d6ox6sdexe984lpuZ .ssh]# cat id_rsa.pub
ssh-rsa ……………………

  

生成密钥对:

ssh-keygen -t rsa -C "350343754@qq.com"

  

复制公钥的内容,粘贴到github。

 

然后在pc端登陆github

[root@iZwz94d6ox6sdexe984lpuZ .ssh]# ssh git@github.com
The authenticity of host ‘github.com (13.250.177.223)‘ can‘t be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
RSA key fingerprint is MD5:16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘github.com,13.250.177.223‘ (RSA) to the list of known hosts.
PTY allocation request failed on channel 0
Hi ZhzhIn! You‘ve successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.

  

linux 或者windows 设置git的ssh

标签:led   war   email   print   ann   rom   --   ted   global   

原文地址:https://www.cnblogs.com/zhizhiyin/p/12445013.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!