一欧聘、問(wèn)題描述
Git Push 失敗片林,具體錯(cuò)誤信息如下:
Pushing to XXX 2023-11-15 18:19:31.668 git-credential-sourcetree[4057:5511477] Error (internetKeychainItemForServer:withUsername:path:port:protocol:) - The specified item could not be found in the keychain.
remote: Support for password authentication was removed on August 13, 2021.remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.fatal: Authentication failed for 'XXX'
Pushing to XXX 2023-11-15 18:19:48.736 git-credential-sourcetree[4178:5512061]
Error (internetKeychainItemForServer:withUsername:path:port:protocol:) - The specified item could not be found in the keychain.User cancelled password prompt.2023-11-15 18:19:52.918 git-credential-sourcetree[4178:5512061] User cancelled pa...
Git 用戶鑒權(quán)認(rèn)證失敗 ,因?yàn)镚itHub在2021年8月13日刪除了對(duì)密碼認(rèn)證的支持怀骤,而改用token的方式進(jìn)行登錄鑒權(quán)费封。
所以就需要先通過(guò)用戶名/密碼的方式先登錄到GitHub平臺(tái),然后生成自己的Token蒋伦,并且用Token來(lái)實(shí)現(xiàn)代碼倉(cāng)庫(kù)的操作弓摘。
簡(jiǎn)言之:原登陸方式:用戶名+密碼;現(xiàn)登陸方式:用戶名+token
二痕届、解決
1韧献、登陸GitHub,打開settings研叫,打開 開發(fā)者設(shè)置
2锤窑、生成tokens
3、使用本次生成的用戶名+token去登陸嚷炉,然后Push即可