GitHub - Personal Access Token 以及修改SourceTree中存儲的密碼
由于8月13日之后,Github的密碼需要由GitHub的密碼,更換為私人訪問令牌,即Personal Access Token,導致無法使用。推送報錯:
Pushing to https://github.com/xxx/xxxxxx.git
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: unable to access 'https://github.com/xxx/xxxxxx.git/': The requested URL returned error: 403
關于Personal Access Token的申請方式參考:https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
可以申請永久令牌,令牌是一次性的,注意保存
之后,需要更新SourceTree的賬號和秘密,參考Sourcetree change password of existing account,需要刪除已保持的密碼,才能生成新的密碼。
具體位置:
/Users/xxxx/Library/Application Support/SourceTree
刪除全部含有“@”的文件,當再次推送push時,就會要求輸入密碼,替換輸入令牌即可,完成推送。

浙公網安備 33010602011771號