版权声明:快乐因分享而永恒,知识而分享而不朽,我分享我快乐... https://blog.csdn.net/walter247443819/article/details/89356554
由于sourcetree版本更新免登陆的方法也需要加一步
Sourcetree 官网:Sourcetree | Free Git GUI for Mac and Windows
SourceTreeSetup-3.1.2
旧版 sourcetree 只需要添加 accounts.json 文件就能实现免注册登录,而新版本则需要 添加 accounts.json 文件和添加 user.config 字段。
-旧版本登录界面
- 新版本登录界面
-
添加 accounts.json 文件
Sourcetree是一个优秀的git可视化管理工具,深受开发者喜爱Sourcetree官网,但是在安装时需要谷歌账户登录,需要翻qiang才可以,此一点一直被人们所诟病。今天本教程就为大家提供离线免登陆安装教程。
方法很简单,只需在固定目录创建一个文件,即可在安装时跳过注册登录环节。
创建accounts.json文件,accounts.json文件目录位置,在以下目录创建accounts.json文件
注:%LocalAppData%是一个Windows目录可识别变量
我的目录 C:\Users\yanfa\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
}
]
修改 user.config 配置
该文件所在路径:%LocalAppData%\Atlassian\SourceTree.exe_Url_xxxxxxxxxx\3.1.2.3027\user.config
我的目录 C:\Users\yanfa\AppData\Local\Atlassian\SourceTree.exe_Url_jba5o2ikpzdn3fhjdpnlxoq3ccpwgjkw\3.1.2.3027\user.config
记事本打开 user.config,在 <SourceTree.Properties.Settings> 添加以下内容并保存即可。
<setting name="AgreedToEULAVersion" serializeAs="String">
<value>20160201</value>
</setting>
打开 sourcetree,此时的界面如下所示,恭喜你功德圆满,大功告成…