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