git 總是要求輸入密碼的問題


在github.com上 建立了一個小項目,可是在每次push 的時候,都要輸入用戶名和密碼,很是麻煩

原因是使用了https方式 push

在termail里邊 輸入 Git remote -v

可以看到形如一下的返回結果

origin https://github.com/yuquan0821/demo.git (fetch)

origin https://github.com/yuquan0821/demo.git (push)

下面把它換成ssh方式的。

  1. git remote rm origin
  2. git remote add origin git@github.com:yuquan0821/demo.git
  3. git push origin


免責聲明!

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



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