Sourcetree是我最喜歡的一款git客戶端工具了。最近在windows上安裝時發現安裝的時候一定要先登錄,但Atlassian的賬號登陸又是要翻墻的,給不方便翻墻的同學帶來不便。
通過比較安裝成功和安裝到一半的文件差別,發現在
%LocalAppData%\Atlassian\SourceTree\
文件下多了一個配置文件
accounts.json
,應該是做了個本地的緩存,那么如果我現有這個本地配置文件是否能跳過遠程登陸呢,嘗試了一下是可以的。
所以在不翻墻安裝windows版Sourcetree的解決方案如下:
先嘗試安裝一次,到登陸界面再退出。
進入
%LocalAppData%\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
}
]