SourceTree授权

发布时间 2023-05-24 09:54:10作者: 娜乌西卡在路上

sourceTree 安装之后需要使用账号登陆以授权,安装成功后先不要打开,可以先执行下面两步之后,再打开。

1.安装之后,转到用户本地文件夹下的 SourceTree 目录,没有则可以新建:C:\Users\用户\AppData\Local\Atlassian\SourceTree (或者 %LocalAppData%\Atlassian\SourceTree\)用户是指自己的本机用户

2.在文件夹内新建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
}
]

3、打开sourceTree,即可授权成功