1.使用ssh-******命令生成key pair:

--------------------------------------------------------------------------------

$ssh-****** -t rsa -C  "YourEmail"                                       "-t rsa"表示使用**的加密类型,还可以为dsa;-C设置注释文字,比如你的邮箱“YourEmail”,不一定要是github注册邮箱
Enter file in which to save the key (/Users/faner/.ssh/id_rsa): 直接回车
Enter passphrase (empty for no passphrase):                          输入**文件授权密码
Enter same passphrase again:                                                  确认**文件授权密码
Your identification has been saved in /Users/faner/.ssh/id_rsa.

Your public key has been saved in /Users/faner/.ssh/id_rsa.pub.xcode通过链接ssh 链接git


2.在github上为当前账号添加SSH公钥:

(1)这里Add SSH Key相当于注册到SSH服务器(github.com)的受信任列表(authorized_keys中。

xcode通过链接ssh 链接git


(2)SSH服务器受信任列表(authorized_keys中可以添加多个SSH客户端的公钥,其中title用于做简单识别,真正起识别作用的是公钥指纹(RSA key fingerprint)。xcode通过链接ssh 链接git

(3)向SSH服务器(github.com)Add自己的SSH Public Key后,github.com将这个SSH Key与你的github账号关联起来,你的机器(Mac git client)将有写权限向你github账号名下的remote repository进行push提交代码。

原博客地址  http://blog.csdn.net/phunxm/article/details/45083335 谢谢


相关文章:

  • 2021-09-27
  • 2021-05-10
  • 2021-09-14
  • 2021-12-24
  • 2022-02-17
  • 2022-12-23
  • 2022-01-05
  • 2021-05-08
猜你喜欢
  • 2022-01-07
  • 2021-04-07
  • 2022-12-23
  • 2021-05-16
  • 2021-05-24
  • 2021-10-16
  • 2022-12-23
相关资源
相似解决方案