解决方案
-
在下面路径下创建一个accounts.json文件(把"你的电脑用户名"部分替代成你自己的信息)
C:\Users"你的电脑用户名"\AppData\Local\Atlassian\SourceTree
(注意: 找对路径. 在Local文件夹里也有一个SourceTree文件夹; 需要添加json文件的这个SourceTree文件夹在Local=>Atlassian下面)
2.创建json文件: 打开CMD,直接输入 type nul>accounts.json即可.会在用用户目录下生成accounts.json文件,剪切到Local=>Atlassian下面。
-
在json文件中输入下面的内容 (不需要做任何的更改)
[
{
“ i d " : " 1 " , " id": "1", " id":"1","type”: “SourceTree.Api.Host.Identity.Model.IdentityAccount, SourceTree.Api.Host.Identity”,
“Authenticate”: true,
“HostInstance”: {
“ i d " : " 2 " , " id": "2", " id":"2","type”: “SourceTree.Host.Atlassianaccount.AtlassianAccountInstance, SourceTree.Host.AtlassianAccount”,
“Host”: {
“ i d " : " 3 " , " id": "3", " id":"3","type”: “SourceTree.Host.Atlassianaccount.AtlassianAccountHost, SourceTree.Host.AtlassianAccount”,
“Id”: “atlassian account”
},
“BaseUrl”: “https://id.atlassian.com/”
},
“Credentials”: {
“ i d " : " 4 " , " id": "4", " id":"4","type”: “SourceTree.Model.BasicAuthCredentials, SourceTree.Api.Account”,
“Username”: “”,
“Email”: null
},
“IsDefault”: false
}
] -
完成上面步骤后,再次执行SourceTree的安装, 这次会直接跳出一个窗口. Mercurial也是一个版本管理工具, 不过我用的是git, 就选择不用.