- 点击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
}
]
- 然后再次打开文件夹
%LocalAppData%\Atlassian\
- 找到SourceTree.exe_Url_nhyjtvwpwvx05ekrps1xkfsnyqgi52cr文件夹,不同版本的sourcetree文件夹名字可能不一样
- 在 <SourceTree.Properties.Settings>节点下加入下面配置
<setting name="AgreedToEULA" serializeAs="String"> <value>True</value> </setting> <setting name="AgreedToEULAVersion" serializeAs="String"> <value>20160201</value> </setting>
- 重新启动sourcetree,就没有注册界面了,出现下面界面
- 选择最后一项即可。
二、错误一
1、错误
sourcetree拉取代码出错:
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
2、原因
要克隆的文件太大
3、解决方法
(1)第一种方法:少clone一些,每个文件只取最近一次提交,不是整个历史版本
git clone https://github.com/xx/xx.git --depth 1
(2)第二种方法:加大缓存区
git config --global http.postBuffer 524288000
(3)第三种方法:更换clone链接,使用SSH方式
我先用的第一种方式,仍然不行。然后采用第二种方式,加大缓存区,仍然不行。采用第三种方法解决。目前想到这三种方式,可以根据自己的情况选择。
2、原因
要克隆的文件太大
3、解决方法
(1)第一种方法:少clone一些,每个文件只取最近一次提交,不是整个历史版本
git clone https://github.com/xx/xx.git --depth 1
(2)第二种方法:加大缓存区
git config --global http.postBuffer 524288000
(3)第三种方法:更换clone链接,使用SSH方式
我先用的第一种方式,仍然不行。然后采用第二种方式,加大缓存区,仍然不行。采用第三种方法解决。目前想到这三种方式,可以根据自己的情况选择。