舊版 sourcetree 只需要添加 accounts.json
文件就能實現免註冊登錄,而新版本則需要 添加 accounts.json
文件和添加 user.config
字段。
- 舊版本登錄界面:<br>
- 新版本登錄界面:<br>
添加 accounts.json 文件
Sourcetree是一個優秀的git可視化管理工具,深受開發者喜愛Sourcetree官網,但是在安裝時需要谷歌賬戶登錄,需要翻qiang纔可以,此一點一直被人們所詬病。今天本教程就爲大家提供離線免登陸安裝教程。
方法很簡單,只需在固定目錄創建一個文件,即可在安裝時跳過註冊登錄環節。
創建accounts.json文件,accounts.json文件目錄位置,在以下目錄創建accounts.json文件
注:%LocalAppData%是一個Windows目錄可識別變量
%LocalAppData%\Atlassian\SourceTree\accounts.json
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
}
]
本段來自 加了白糖的老乾媽 的CSDN 博客 ,全文地址請點擊:https://blog.csdn.net/qq_21358931/article/details/80798351
修改 user.config 配置(20190331驗證通過)
該文件所在路徑:
C:\Users\Administrator\AppData\Local\Atlassian\SourceTree.exe_Url_nhyjtvwpwvx05ekrps1xkfsnyqgi52cr\3.2.6.3544
記事本打開 user.config
,在 <SourceTree.Properties.Settings>
添加以下內容並保存即可。
<setting name="AgreedToEULAVersion" serializeAs="String">
<value>20160201</value>
</setting>
再次打開SourceTree即顯示註冊成功