首先生成shh key
ssh-keygen -o -t rsa -C "[email protected]" -b 4096 #替换自己邮箱
进入C:\Users\用户名.ssh 找到.pub
cat id_rsa.pub
ssh -T [email protected] 测试
登陆上gitlab,点击用户头像,现在settings,单击SSH keys 将刚刚生成的key复制进去,取个名字 安装好SourceTree 点击工具->选项->一般
转自大海技术博客:http://www.ypyunedu.com/article/114