Windows 10 配置 Github SSH Key

Windows配置Github SSH Key

 

1、首先安装git,百度云盘下载的地址:http://pan.baidu.com/s/1jHZb838)

 

2、安装好以后打开:Git Bash, 执行:

// 这里的Marishunxiang@gmail.com 是我的Github的帐号,换成你的自己帐号就好了

$ ssh-keygen -t rsa -C "Marishunxiang@gmail.com"

然后点击回车,设置密码,也可设置为空。一路确定!

 

3、然后进入当前的用户的目录下,打开 .ssh 文件夹里面会有2个文件: id_ras 和 id_rsa.pub,比如我的电脑是Windows 8.1 系统目录是:

C:\Users\Administrator\.ssh

这里写图片描述

4、登录GitHub系统;点击右上角账号头像的“▼”→Settings→SSH and GPG keys →New SSH key。

 

5、复制id_rsa.pub的公钥内容。添加到Key 中,Titile可以随便填写。最后 Add SSH Key。

这里写图片描述

6、测试ssh keys是否设置成功。

$ ssh -T git@github.com

$ ssh -T git@github.com 
The authenticity of host ‘github.com (192.30.253.112)’ can’t be established. 
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. 
Are you sure you want to continue connecting (yes/no)? yes #确认你是否继续联系,输入yes 
Warning: Permanently added ‘github.com,192.30.253.112’ (RSA) to the list of know n hosts. 
Hi MariShunxiang! You’ve successfully authenticated, but GitHub does not provide shell access. #出现这句话,说明设置成功。

这里写图片描述

  • 5
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值