解決git賬號密碼驗證問題:Please use a personal access token instead


1.發現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: Authentication failed for 'https://github.com/877762536/meiyuan_new.git/'

原因是git棄用了git賬號密碼驗證,改用token或SSH秘鑰驗證

2.創建token

1.登陸github,找到settings

2.配置access token

Developer settings->Personal access tokens->Generate new token
Note:名字可以自己定義
Expiration:過期時間,可以按自己的需求設置
Select scopes:如果是個人使用的話可以全選

3.使用token

填寫password的時候,輸入2.2生成的token就行

$ git clone https://github.com/username/repo.git
Username: your_username
Password: your_token


免責聲明!

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



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