Git push “fatal: Authentication failed ”


Git push “fatal: Authentication failed ”

問題原因

  • 之前設置了兩步驗證
 If you enabled two-factor authentication in your Github account you won't be able to push via HTTPS using your accounts password. Instead you need to generate a personal access token. This can be done in the application settings of your Github account. Using this token as your password should allow you to push to your remote repository via HTTPS. Use your username as usual.

解決方法

  • 更新分支
git remote -v 
git remote remove origin 
git remote add origin git@github.com:user/repo.git  

參考資料


[1].Git push results in “Authentication Failed”


免責聲明!

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



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