一、下载
官网https://www.sourcetreeapp.com/
二、安装
一般默认下一步即可,可以选择不立刻生成ssh密钥,等会在生成。免用户登录
在目录C:\Users\Administrator\AppData\Local\Atlassian\SourceTree 下创建一个文件accounts.json;
将下列代码复制,粘贴进accounts.json;重新打开软件就可以使用了。
[
{
"$id": "1",
"$type": "SourceTree.Api.Host.Identity.Model.IdentityAccount, SourceTree.Api.Host.Identity",
"Authenticate": true,
"HostInstance": {
"$id": "2",
"$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountInstance, SourceTree.Host.AtlassianAccount",
"Host": {
"$id": "3",
"$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountHost, SourceTree.Host.AtlassianAccount",
"Id": "atlassian account"
},
"BaseUrl": "https://id.atlassian.com/"
},
"Credentials": {
"$id": "4",
"$type": "SourceTree.Model.BasicAuthCredentials, SourceTree.Api.Account",
"Username": "username@email.com"
},
"IsDefault": false
}
]
三、配置
安装进入之后,页面如下:
3.1配置生成ssh
我们主要需要设置我们的用户信息和ssh秘钥信息
我们先打开我们的git的终端
最终生成文件
3.2配置生成ssh私钥
点击generate,生成密钥和公钥
蓝色字为公钥,可以对自己生成的公钥密钥都进行保存,点击save xxx即可;
若是你已经有生成过的密钥,选择load,所有文件类型去找你要的密钥ppk文件。
生成的密钥在工具当中的选项进行配置即可。里面的ssh密钥就选择刚生成的即可。