为git配置ssh

git clone有两种方式,一种是http,一种是ssh。

配置ssh的好处是:在每次push代码的时候不需要输入密码。

bash上生成秘钥: 

ssh-keygen -t rsa -C "username"

会生成一个公钥和一个密钥,公钥是放在gibhub或者gitlab类似的平台上的,而密钥是放在自己电脑上的

tortoise是常用的git图形化工具。

用tortoise包中的puttygen来生成密钥,使用pageant来导入密钥,这样使用tortoise来push代码的时候就不需要输入密码了。

原文地址:https://www.cnblogs.com/zzdylan/p/6218922.html