Windows

众所周知,SourceTree 是个好用的 Git 客户端,但是安装之后必须要登录才能使用,这一点有点难受,而且一些原因,在国内并不是很好注册账号去登录,所以就有人找到跳过这一配置的方法:
在目录 C:\Users{$user}\AppData\Local\Atlassian\SourceTree 下新建文件 accounts.json ,文件里输入下面内容即可。

  1. [
  2. {
  3. "$id": "1",
  4. "$type": "SourceTree.Api.Host.Identity.Model.IdentityAccount, SourceTree.Api.Host.Identity",
  5. "Authenticate": true,
  6. "HostInstance": {
  7. "$id": "2",
  8. "$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountInstance, SourceTree.Host.AtlassianAccount",
  9. "Host": {
  10. "$id": "3",
  11. "$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountHost, SourceTree.Host.AtlassianAccount",
  12. "Id": "atlassian account"
  13. },
  14. "BaseUrl": "https://id.atlassian.com/"
  15. },
  16. "Credentials": {
  17. "$id": "4",
  18. "$type": "SourceTree.Model.BasicAuthCredentials, SourceTree.Api.Account",
  19. "Username": "",
  20. "Email": null
  21. },
  22. "IsDefault": false
  23. }
  24. ]

参考文章

https://segmentfault.com/a/1190000012104165