SourceTree Personal Access Token

SourceTree Personal Access Token

這篇介紹How to solve SourceTree use Personal Access Token。

發生情境

1
2
3
4
某一天要git push時,出現以下:
Pushing to https://github.com/xxx/xxx.git
remote: Support for password authentication was removed on August 13, 2021.
Please use a personal access token instead.

解決方法

1
2
3
4
5
6
7
8
9
10
11
登入Github
Settings -> Developer settings -> Personal access tokens
申請完會給一組只能看一次的token替代password。

SourceTree因有原本的帳號密碼認證紀錄
需去
%LocalAppData%\Atlassian\SourceTree\userhost
%LocalAppData%\Atlassian\SourceTree\passwd
將兩個檔案移除,重啟SourceTree
做任何一個remote操作會需要輸入帳號和密碼
這邊的密碼請輸入剛取得的Personal access token