1-使用 git remote -v 查看对应的克隆地址:
git remote -v
origin https://github.com/username/repository.git (fetch)
origin https://github.com/username/repository.git (push)
可以看到确实是以https方式clone的
2-删除并重新添加:
git remote rm origin
git remote add origin git@github.com:username/repository.git
3-push一下
git push -u origin master
原文:https://www.cnblogs.com/zhangguorenmi/p/13149585.html