在過去的三周里,我一直在使用 OSX 鑰匙串來管理我的 GitHub 憑證。每當我需要更新時,我都會這樣做:
git pull origin master
使用此命令,然後鑰匙串會彈出並請求我輸入密碼,然後執行在命令行中輸入的命令。
今天早上突然,我去拉另一個更改,它現在在命令行中詢問我的用戶名和密碼。然後我得到通常的錯誤:
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.
我已經研究了一段時間,不明白為什麼其他問題中的方法不起作用。我沒有運氣就關注了這些其他帖子
首先,這與ssh-add
用於緩存私有 SSH 密鑰passphrase無關。
其次,這與GitHub 新政策有關:Git 密碼身份驗證正在關閉。
您需要使用PAT(個人訪問令牌)而不是您的 GitHub 帳戶密碼,如Antonello Zanini 的“處理 GitHub 密碼驗證棄用”中所述,並在此處進行了描述。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句