一 github服务器切换ip后需修改以下配置
1.修改gitlab.rb中的external_url
1 | cd /etc/gitlab/gitlab.rb |
2.修改gitlab.yml中的host
1 | cd /var/opt/gitlab/gitlab-rails/etc/gitlab.yml |
3.重启gitlab服务
1 | gitlab-ctl restart |
二 github切换ip后本地改动
1.现象
2.切换url
1 | git remote set-url origin git@172.21.7.11:HairRobot/micro-services/haier-robot-maintenance.git |
或1
2git remote rm origin
git remote add origin git@172.21.7.11:HairRobot/micro-services/haier-robot-maintenance.git