从ssh切换至https
git remote set-url origin(远程仓库名称) https://domain/username/ProjectName.git
从https切换至ssh
git remote set-url origin git@domain:username/ProjectName.git
附录
git remote set-url [--push] <name> <newurl> [<oldurl>]
git remote set-url --add [--push] <name> <newurl>
git remote set-url --delete [--push] <name> <url>
详见:git官方手册