remote: Support for password authentication was removed on August 13, 2021.


今天用sourcetree拉取代碼的時候報錯:

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/shliang0603/Yolov4_DeepSocial.git/': The requested URL returned error: 403

通過查看網站https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information,得知原先的密碼憑證從2021年8月13日開始就不能用了,必須使用個人訪問令牌(personal access token),也就是說,要把個人密碼替換成token。

那么首先,需要在GitHub上創建token。

參考:https://blog.csdn.net/weixin_41010198/article/details/119698015

接下來就是修改密碼。

打開mac電腦的鑰匙串訪問,圖標大概是這個樣子:

打開它,在右上角的搜索欄搜索git,如下圖所示:

 

 雙擊Github Credentials,如下圖所示:

 顯示密碼之后,將access_token=后面的內容刪掉,改為剛剛創建好的personal access token即可。

 然后再重新拉取代碼。

如果有問題,在sourcetree的設置里打開遠程倉庫,如下圖所示:

 

 

 

 點擊編輯配置文件,查看里面的鏈接是否正確。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM