RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.

1.注册邮箱

在git bash界面输入如下内容即可完成邮箱的注册:
g i t c o n f i g g l o b a l u s e r . n a m e u s e r . n a m e 便 M r z o u git config –global user.email “[email protected]
(说明: 双引号中需要输入你的有效邮箱,比如“[email protected]”)

2.查看是否存在ssh keys

$ cd ~/.ssh
若出现“No such file or directory”,则表示需要创建一个ssh keys。

3.创建新的ssh keys
$ssh-keygen -t rsa -C “[email protected]

: C : \MykeysForGit \( s s h k e y s C : \User . s s h 输入密码: 123456
$确认密码: 123456

(或者直接三个回车,省事)

如此即可在C:\MykeysForGit\文件夹中生成ssh keys。包括两个文件rd_rsa和id_rsa.pub

4.到目前为止即完成了git软件的安装和钥匙的生成。

添加公钥到你的远程仓库(github)

1、查看你生成的公钥:
pwd
打开文件所在位置

2、登陆你的github帐户。点击你的头像,然后 Settings -> 左栏点击 SSH and GPG keys -> 点击 New SSH key
把pub公钥倒进去就OK

猜你喜欢

转载自blog.csdn.net/github_37216944/article/details/80431011