• 点击Sourcetree安装运行,会出现下面这个窗口

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相关

 

  • 在 <SourceTree.Properties.Settings>节点下加入下面配置
<setting name="AgreedToEULA" serializeAs="String">
        <value>True</value>
</setting>
<setting name="AgreedToEULAVersion" serializeAs="String">
        <value>20160201</value>
</setting>

 

  • 重新启动sourcetree,就没有注册界面了,出现下面界面

SourceTree相关

 

  •  选择最后一项即可。

二、错误一

1、错误

sourcetree拉取代码出错:

error: RPC failed; curl 18 transfer closed with outstanding read data remaining

 

SourceTree相关

 

2、原因

要克隆的文件太大

3、解决方法

(1)第一种方法:少clone一些,每个文件只取最近一次提交,不是整个历史版本   

 git clone https://github.com/xx/xx.git --depth 1    

 

(2)第二种方法:加大缓存区     

git config --global http.postBuffer 524288000

 

(3)第三种方法:更换clone链接,使用SSH方式

SourceTree相关

  

我先用的第一种方式,仍然不行。然后采用第二种方式,加大缓存区,仍然不行。采用第三种方法解决。目前想到这三种方式,可以根据自己的情况选择。

SourceTree相关

 

2、原因

要克隆的文件太大

3、解决方法

(1)第一种方法:少clone一些,每个文件只取最近一次提交,不是整个历史版本   

 git clone https://github.com/xx/xx.git --depth 1    

 

(2)第二种方法:加大缓存区     

git config --global http.postBuffer 524288000

 

(3)第三种方法:更换clone链接,使用SSH方式

SourceTree相关

  

我先用的第一种方式,仍然不行。然后采用第二种方式,加大缓存区,仍然不行。采用第三种方法解决。目前想到这三种方式,可以根据自己的情况选择。

相关文章:

  • 2021-08-27
  • 2021-08-29
  • 2022-01-03
  • 2021-09-12
猜你喜欢
  • 2021-04-12
  • 2022-02-13
  • 2022-12-23
  • 2021-11-17
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案