问题描述
安装好SourceTree后,首次使用时,需要通过账户登录,但注册或登录界面可能根本无法打开,导致无法进入软件
解决办法
在目录C:\Users\{youruser}\AppData\Local\Atlassian\SourceTree
下创建文件accounts.json
,注意:{youruser}需要替换为登录系统用户名。
写入如下内容:
[
{
"$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
}
]
重新启动软件,顺利进入界面
其实这个地方有个坑,好多人这么配置了,扔抱怨还是不好用,这里要注意几点:
Source Tree的目录C:Users\tc\AppData\Local\Atlassian\SourceTree
而不是目录C:\Userstc\AppData\Local\SourceTree(我就犯得这个错,文件放错位置)文件建完后,启动目录C:\Users\tc\AppData\Local\SourceTree下的SourceTree.exe
此时就Ok了。桌面会创建出一个快捷方式。