1. 程式人生 > 實用技巧 >win10 安裝sourcetree跳過註冊

win10 安裝sourcetree跳過註冊

參考文章: Windows10 下安裝SourceTree 跳過註冊 Bitbucket

前提: 已安裝git

  1. 在sourcetree官網 下載 windows版的 sourcetree 安裝包,我的是 SourceTreeSetup-3.3.8.exe
  2. 雙擊安裝,會出現 需要 註冊賬號部分的介面
  3. 關閉這個sourcetree 安裝介面
  4. C:\Users\當前使用者資料夾\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
  }
]
  1. 編輯目錄 C:\Users\當前使用者資料夾\AppData\Local\Atlassian\SourceTree.exe_Url_ul4qrk3hz4zqb14vcaiypmrdv255kkqk\3.3.8.3848 下的 user.config 檔案

configuration -> userSettings -> SourceTree.Properties.Settings 節點新增以下內容:

<setting name="AgreedToEULA" serializeAs="String">
                <value>True</value>
            </setting>
            <setting name="AgreedToEULAVersion" serializeAs="String">
                <value>20160201</value>
            </setting>
  1. 重新點選可執行檔案SourceTreeSetup-3.3.8.exe,選擇最後一項:我不想要mercurial