How can I change the url for a project in GitLab?

拥有回忆 提交于 2019-12-10 14:52:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!