gitlab-shell 404 Internal API error
Summary
When using the puma web server with unicorn disabled and not configured gitlab-shell is broken preventing ssh access to repositories.
Steps to reproduce
- Install gitlab 12.10.14
- Set puma['listen'] and puma['port'] to something beside the defaults like localhost and 7056, but do not set unicorn['listen'] and unicorn['port'].
- Run
gitlab-ctl reconfigure
. - Try to access a gitlab project via ssh git clone git@gitlab.domain:mygroup/myproject.git
- Recieve "Internal API error (404)" in the console output
What is the current bug behavior?
When puma['listen'] and/or puma['port'] are set gitlab_url in /opt/gitlab/embedded/service/gitlab-shell/config.yml is not updated.
What is the expected correct behavior?
Setting only puma['listen'] and puma['port'] with puma enabled and unicorn disabled without setting any other unicorn settings should configure the gitlab_url: variable in /opt/gitlab/embedded/service/gitlab-shell/config.yml to point to the new address:port.
Workaround
Set unicorn['listen'] and unicorn['port'] to the same values as puma['listen'] and puma['port'] then run gitlab-ctl reconfigure.
Potential Fixes
Problem line: https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/12.10.14+ee.0/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb#L54 Fix is in the following commit: ca5f3584