GitLab modified the default port solution when it encountered ssh.
It is really easy for GItLab to use SSH key-free authentication, but when it is configured, it is found that the default port of ssh (22) has been modified, which is unreachable. Many partners have encountered this problem. After some thinking, I feel the need to modify the server configuration, here to write a specific blog, so that everyone less pit.
Modify step
1. Modify ssh port (skip this step) Port port 2, modify / etc/gitlab/gitlab.rb [the configuration in gitlab.yml will be overwritten by this] / / later modify your own ssh port gitlab_rails ['gitlab_shell_ssh_port'] = 213863 to make it effective. Gitlab-ctl reconfigure defaults to port 22, but no port will appear for direct access. )
Modified effect:
Test: (as long as ssh trust is done well)
Method 1:
Method 2: