转 https://www.jianshu.com/p/88be35d15316
任意空白处右键,TortoiseGit设置,重新运行首次启动向导

一直下一步就好,有一处需要设置个用户名和邮箱(不用于身份验证)

生成PuTTY密钥对


注意下,这个进度条你会发现很慢,需要你动鼠标在空白处多晃动几下就很快了,注意上面写的Please内容


上面圈出部分是公钥,将私钥保存下来
我这里用的是gitlab,将公钥复制到gitlab中

我这里本地已经搭好了一个gitlab,加载Putty密钥,这个就是刚才保存的私钥


如果ssh连接不成功,请检查你的ssh端口是否是默认的22