解決生成ssh密匙後還需要輸入密碼
- 2019 年 11 月 13 日
- 筆記
問題
配置了centOS後每次git pull還需要輸入密碼
原因是當時添加倉庫的是使用了https
而不是git
方式,所以需要更新origin
git remote remove origin git remote add origin [email protected]:Username/Your_Repo_Name.git
注意上面添加的倉庫地址形式是git@git_repo
之後還需要重新設置track branch,比如:
git branch --set-upstream-to=origin/master master
參考文章:https://blog.csdn.net/shahuhu000/article/details/86625987