解决git push 每次都需要输入用户名和密码的问题

解决方案

每次提交都需要密码是因为采用的 https 方式提交代码,如果采用的是 ssh 方式只需要在版本库中添加用户的 rsakey 就可以实现提交时无需输入用户名和密码。

代码

git remote rm origin
git remote add origin git@github.com:(用户名)/(仓库名)
posted @ 2018-07-12 12:12  mikelian  阅读(314)  评论(0)    收藏  举报