您的位置:首页 > 运维架构 > Linux

git 的使用-linux上的配置 -ssh

2014-11-06 13:02 465 查看

1. 创建github 账号:

网站: https://github.com/

账号密码自己填。Ok。

2. 进入Ubuntu命令编辑器。


1)生成SSH keys

[php] view
plaincopy





ssh-keygen -t rsa -C "yangyi@sina.cn"

[php] view
plaincopy





root@yangyi:~# ssh-keygen -t rsa -C 'yangyi@sina.cn' #这里填你的注册邮箱



Generating public/private rsa key pair.



Enter file in which to save the key (/root/.ssh/id_rsa): #回车就可以,默认的路径



Created directory '/root/.ssh'.



Enter passphrase (empty for no passphrase): #输入密码,不一定要是注册密码



Enter same passphrase again: #重复输入密码,看不见的



Your identification has been saved in /root/.ssh/id_rsa.



Your public key has been saved in /root/.ssh/id_rsa.pub.



The key fingerprint is:



a0:95:33:24:26:ca:b7:ed:c2:95:97:48:d4:e9:4f:89 yangyi@sina.cn



The key's randomart image is:



+--[ RSA 2048]----+



| . o.o . |



|.. o.o + |



|.. . .B . . |



| . +ooE.o |



| ..= oS |



| . o . . |



| o . |



| . |



| |



+-----------------+



root@yangyi:~#




2)复制key 到github网站

打开,刚才生成的密钥:



全部复制,进入github 网站,点击Account settings
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: