最近工作电脑更换了,所有软件得重新下载,下载了Win10版本的SourceTree之后发现注册太麻烦了,于是网上找了一种accounts.json文件来跳过注册的方式。
首先进入SourceTree的安装目录,一般是在:系统盘\用户名\AppData\Local\Atlassian\SourceTree,新建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": null
},
"IsDefault": false
}
]
保存之后发现没什么卵用,再进入另一个目录:
系统盘\用户\AppData\Local\Atlassian\SourceTree.exe_Url_cpmp0dlqe3ku4k0klftfighmcd0wa5n2\3.2.6.3544
编辑这个文件:
加入两个配置:
<setting name="AgreedToEULA" serializeAs="String">
<value>True</value>
</setting>
<setting name="AgreedToEULAVersion" serializeAs="String">
<value>20160201</value>
</setting>
重新打开SourceTree就可以跳过注册了。