问题
I have a project in Gitlab that is available over HTTP/SSH:
git@192.168.1.10:MyGroup/MyProject.git
I want to change that using another IP, i.e.:
git@192.168.1.20:MyGroup/MyProject.git
Where or how can I change that?
回答1:
You can use below command to set new URL for your repository.
git remote set-url origin git://git@192.168.1.20:MyGroup/MyProject.git
回答2:
You can find all repositories remotes inside the file .git/config
. You can edit it by hand or use command git remote
.
来源:https://stackoverflow.com/questions/44390210/how-can-i-change-the-url-for-a-project-in-gitlab