标签:
使用ssh协议通过密钥验证的方式提交代码,不用再每次提交时输入账户密码。
1.打开bash 输入一下命令,
ssh-keygen -t rsa -
C
youremail@example.com(把邮件地址换成你自己的邮件地址)一路回车默认,此时就生成了钥匙。
2。钥匙路径为
C:\Users\Administrator\.ssh 下的id_rsa.pub文件
3.打开github账户进入setting ssh and gpg keys

然后选择 New SSH key

title随便填些东西,
id_rsa.pub中的内容复制到key中,然后点击 Add SSH key

4.克隆仓库时选择ssh协议的地址
此时在bash窗口下add commit push就不用输入密码了。
标签:
原文地址:http://www.cnblogs.com/ytu2010dt/p/5451180.html