Gitlab with non-standard SSH port (on VM with Iptable forwarding)

后端 未结 3 399
慢半拍i
慢半拍i 2020-12-23 14:12

My gitlab is on a virtual machine on a host server. I reach the VM with a non-standard SSH port (i.e. 766) which an iptable rule then forward from

3条回答
  •  -上瘾入骨i
    2020-12-23 14:23

    if you configure the ssh_port correctly in config/gitlab.yml, the webpages will show the correct repo url.

    ## GitLab Shell settings
    gitlab_shell:
      ...
      # If you use non-standard ssh port you need to specify it
      ssh_port: 766
    

    ps. the correct url is: ssh://git@git.domain.com:766/group/project.git

    edit: after the change you need to clear caches, etc:

    bundle exec rake cache:clear assets:clean assets:precompile RAILS_ENV=production
    

提交回复
热议问题