Git创建ssh-key
2017-03-01 10:41
330 查看
[align=center]Git创建ssh-key[/align]
远程仓库是Git的一大特色,可以分布在不停地机器上。Github可以实现在线项目的托管,Git与Github是通过SSH加密传输的,需要设置:
第一步:创建SSH Key 在用户主目录下,查看是否有.ssh目录,如果有则跳过,如果没有:打开Git Bash:$ ssh-keygen -t rsa -C "yourmail@example.com"
邮箱地址设置为自己的邮箱地址,然后一个回车,使用默认值即可,也可以设置密码;
如果顺利,可以在主目录里找到.ssh目录,里面有id_rsa和id_rsa.pub两个文件,就是SSH Key的密钥对,id_sra是私密,不能泄露,id_rsa.pub是公钥;
第二步:登录GitHub,打开Accout settings,SSH Keys的页面;然后点Add SSH Key,填上任意title,在Key文本框里粘贴id_rsa.pub文件的内容;
Import code
远程仓库是Git的一大特色,可以分布在不停地机器上。Github可以实现在线项目的托管,Git与Github是通过SSH加密传输的,需要设置:
第一步:创建SSH Key 在用户主目录下,查看是否有.ssh目录,如果有则跳过,如果没有:打开Git Bash:$ ssh-keygen -t rsa -C "yourmail@example.com"
邮箱地址设置为自己的邮箱地址,然后一个回车,使用默认值即可,也可以设置密码;
如果顺利,可以在主目录里找到.ssh目录,里面有id_rsa和id_rsa.pub两个文件,就是SSH Key的密钥对,id_sra是私密,不能泄露,id_rsa.pub是公钥;
第二步:登录GitHub,打开Accout settings,SSH Keys的页面;然后点Add SSH Key,填上任意title,在Key文本框里粘贴id_rsa.pub文件的内容;
…or create a new repository on the command line
echo "# Testing" >> README.md git init git add README.md git commit -m "first commit" git remote add origin git@github.com:silicon2016/Testing.git git push -u origin master
…or push an existing repository from the command line
git remote add origin git@github.com:silicon2016/Testing.git git push -u origin master
…or import code from another repository
You can initialize this repository with code from a Subversion, Mercurial, or TFS project.Import code
相关文章推荐
- Windows下Git SSH创建key
- Windows 7下Git SSH 创建Key的步骤
- Windows 7下Git SSH 创建Key的步骤
- Windows 7下Git SSH 创建Key的步骤(by 星空武哥)
- Windows 7下Git SSH 创建Key的步骤(by 星空武哥)
- Windows 7下Git SSH 创建Key的步骤(经个人实践win10环境下也可行)
- Windows 7下Git SSH 创建Key的步骤(by 星空武哥)
- Windows下Git SSH 创建Key的步骤
- Windows 7下Git SSH 创建Key的步骤(by 星空武哥)
- Windows 7下Git SSH 创建Key的步骤
- Windows 7下Git SSH 创建Key【待解决?】
- Windows 7下Git SSH 创建Key的步骤(by 星空武哥)
- windows 7 下创建git ssh key
- Windows 7下Git SSH 创建Key的步骤
- Windows 7下Git SSH 创建Key的步骤
- Windows 7下Git SSH 创建Key的步骤(by 星空武哥)
- Git SSH 创建Key的步骤
- Git创建ssh-key
- git ssh key创建和github使用
- Win7下Git SSH 创建Key