问题描述:sourceTree安装后,需要登录或注册。但是这个需要翻墙,一般情况下无法打开。
解决方法:
在C:\Users{youruser}\AppData\Local\Atlassian\SourceTree目录下创建新文件,文件名为accounts.json,注意有的电脑将AppData文件夹隐藏了,可以通过导航栏找到。
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": "[email protected]"
},
"IsDefault": false
}
]
然后重新启动即可。