一:首先查看是否本项目初始化了git
git remote -v
不出意外你将会看到类似如下
origin https://github.com/rubenYuan/demo.git (fetch)
origin https://github.com/rubenYuan/demo.git (push)
二:ssh替换https
2.1、移除原有的依赖
git remote rm origin
2.2、新增现在的ssh依赖
git remote add origin git@github.com:rubenYuan/xxx.git
2.3、提交
git push origin master
完!