kingBook

导航

git 每次push都需要输入用户和密码

git remote -v
origin  https://github.com/userName/xx.git (fetch)
origin  https://github.com/userName/xx.git (push)

原因是使用了https/http的方式来push
1.移除原来的remote

git remote remove origin

2.创建新的remote

git remote add origin  git@github.com:userName/xx.git

3.再输入git remote -v ,发现remote改变了

git remote -v 
origin  git@github.com:userName/xx.git (fetch)
origin  git@github.com:userName/xx.git (push)

posted on 2018-12-29 09:48  kingBook  阅读(124)  评论(0编辑  收藏  举报