1. 程式人生 > >Mac版SourceTree建立新倉庫時輸入賬號密碼報錯

Mac版SourceTree建立新倉庫時輸入賬號密碼報錯

Mac上的SourceTree新建倉庫,從URL克隆,要求輸入賬號密碼:
在這裡插入圖片描述
輸入四次賬號密碼後報錯:
“2018-01-25 17:07:08.977 git-credential-sourcetree[23269:483753] Something went wrong. one or more parameters required to renew token is nil.

fatal: Authentication failed for ‘https:/…git/’

2018-01-25 17:07:14.983 git-credential-sourcetree[23278:483854] Something went wrong. one or more parameters required to renew token is nil.

fatal: Authentication failed for ‘https://…git/’

2018-01-25 17:07:22.999 git-credential-sourcetree[23285:484038] Something went wrong. one or more parameters required to renew token is nil.

Completed with errors, see above”

最終顯示無效URL路徑。

解決方法:

  1. 關閉SourceTree
  2. 從Finder中進入路徑~/Library/Preferences/ ,找到檔案com.torusknot.SourceTreeNotMAS.plist,並刪除該檔案
    在這裡插入圖片描述

此時再開啟SourceTree重新從URL克隆,輸入一遍賬號密碼後應該就可以了。如果還不成功,重新執行步驟1、2,再加一步:
進入Mac的“鑰匙串訪問”App:
在這裡插入圖片描述
點選一下->鎖上,再點選一下->解鎖

然後再重新啟動SourceTree,建立新倉庫,就能成功了!