當我在 VS Code 中執行以下命令時,它作業正常。
git clone https://github.com/example-repo.git
但是當我在終端(Ubuntu)中執行相同的命令時,會出現以下錯誤:
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://example-repo.git/'
已經為此帳戶設定了個人訪問令牌(具有讀取、寫入和洗掉權限)。
uj5u.com熱心網友回復:
你需要在你的檔案夾中生成一個 ssh 密鑰~/.git,你可以閱讀這篇文章,它將幫助你設定你的密鑰:
https://dev.to/augustocarmona/how-to-set-up-ssh-keys-and-connect-them-to-github-3136#:~:text=Connecting to GitHub with SSH:&text =在 this, go to your之后,輸入 your password and voila!
uj5u.com熱心網友回復:
由于洗掉了對密碼身份驗證的支持,我只建議使用 github-cli 它會讓你的生活變得更簡單。
https://cli.github.com/
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/409104.html
標籤:
