以项目 https://github.com/mazeyqian/mazey 为例,查看远程地址:
# check
git remote -v;
origin https://github.com/mazeyqian/mazey.git (fetch)
origin https://github.com/mazeyqian/mazey.git (push)
修改远程地址:
# set HTTPS to SSH
git remote set-url origin git@github.com:mazeyqian/mazey.git
# check
git remote -v;
origin git@github.com:mazeyqian/mazey.git (fetch)
origin git@github.com:mazeyqian/mazey.git (push)
2023年4月2日
git remote set-url origin git@gitee.com:mazeyqian/garbage-games.git