Centos 6.6系统下安装Github

来源:互联网 发布:网页美工图片 编辑:程序博客网 时间:2024/05/16 13:05

https://help.github.com/articles/generating-ssh-keys/#platform-linux 官方设置教程在这个网址

 yum install git   //首先安装githubssh-keygen -t rsa -b 4096 -C "your_email@example.com"//运行这段代码   your_email@example.com  就是你自己的github邮箱/* Generating public/private rsa key pair.出现:Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]按回车Enter passphrase (empty for no passphrase): [Type a passphrase]# Enter same passphrase again: [Type passphrase again]输入两次密码,用来后面获取sshkey*/再运行ssh-add ~/.ssh/id_rsa

运行:

cat ~/.ssh/id_rsa.pub

会拿到一段ssh-rsa 开头 your_email@example.com 结尾的key
然后拿到这段key

登陆github的网站去添加,这段教程在官网中有截图,在setting 的 SSH keys里Add ,会发帖的都会。

添加成功以后

运行:

ssh -T git@github.com

检测是否链接上
看到下面两个代码出现,你就超神一般的搞定了

[root@HTY-1 ~]# ssh -T git@github.comThe authenticity of host 'github.com (192.30.252.121)' can't be established.RSA key fingerprint is 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)? yesWarning: Permanently added 'github.com,192.30.252.121' (RSA) to the list of known hosts.Hi crazyyanchao! You've successfully authenticated, but GitHub does not provide shell access.

clone项目,运行

git clone https://github.com/JustLittleBoy/One.git
0 0
原创粉丝点击