首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

使用github托管项目,记录上操作

2012-10-15 
使用github托管项目,记录下操作github是使用ssh认证的。所以先要创建一个公钥/私钥对github ssh帮助文档ssh

使用github托管项目,记录下操作

github是使用ssh认证的。

所以先要创建一个公钥/私钥对

github ssh帮助文档

ssh-keygen -t rsa -C "your_email@youremail.com"
运行之后会看到如下:

Your identification has been saved in /home/you/.ssh/id_rsa.# Your public key has been saved in /home/you/.ssh/id_rsa.pub.# The key fingerprint is:# 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your_email@youremail.com
使用如下命令将key复制到剪贴板

sudo apt-get install xclip# Downloads and installs xclipxclip -sel clip < ~/.ssh/id_rsa.pub# Copies the contents of the id_rsa.pub file to your clipboard
测试是否成功:

ssh -T git@github.com# Attempts to ssh to github
若成功将会看到:

ou may see this warning:

# The authenticity of host 'github.com (207.97.227.239)' 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)?

Don't worry, this is supposed to happen. Verify that the fingerprint matches the one here and type "yes".

# Hi username! You've successfully authenticated, but GitHub does not# provide shell access.

热点排行