码云公钥管理
1.Linux上对git进行全局配置
该配置只需做一次且对该Linux主机上所有git管理项目生效:
[dinghuanhuan@centos6 ~]$>git config --global user.name "dinghuanhuan"
[dinghuanhuan@centos6 ~]$>git config --global user.email "736787419@qq.com"
2.Linux上生成SSH key:
[dinghuanhuan@centos6 ~]$>ssh-keygen -t rsa -C "736787419@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/dinghuanhuan/.ssh/id_rsa): 按回车
/home/dinghuanhuan/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 按回车
Enter same passphrase again: 按回车
Your identification has been saved in /home/dinghuanhuan/.ssh/id_rsa.私钥
Your public key has been saved in /home/dinghuanhuan/.ssh/id_rsa.pub.公钥
The key fingerprint is:
40:cd:95:07:23:ae:41:01:3b:92:11:5d:02:28:3e:fd 736787419@qq.com
The key's randomart image is:
+--[ RSA 2048]----+
| .++oo=+..+o |
|o o.= .o.... |
|o + o o . . |
| o o . + |
| . . . S |
| E |
| |
| |
| |
+-----------------+
3.上传Public Key:
查看public key并拷贝,将他添加到码云个人帐号的SSH公钥里:
[dinghuanhuan@centos6 ~]$>cat ~/.ssh/id_rsa.pub
ssh-rsa xxx== 736787419@qq.com
4.公钥添加测试
[dinghuanhuan@centos6 gitee]$>ssh -T git@git.oschina.net
Warning: Permanently added the RSA host k