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

后端 未结 3 401
慢半拍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条回答
  •  不思量自难忘°
    2020-12-23 14:27

    N.B.: this was tested on an old Giltab version (v5-v6), and might not be suitable for modern instance.

    You can achieve similar behavior in a 2 step process:

    1. Edit: config/gitlab.yml

    On the server, set the port to the one you use:

    ssh_port: 766
    

    2. Edit ~/.ssh/config

    On your machine, add the following section corresponding to your gitlab:

    Host sub.domain.com
            Port 766
    

    Limit

    You will need to repeat this operation on each user's computer…

    References

    • GitLab and a non-standard SSH port

提交回复
热议问题