I’ve got a gitlab backup file from a previous Gitlab-CE v16.4.0 deployment and my users need to retrieve an old repo that was not migrated to a new server. So I built a new server and installed Gitlab-CE v16.4.0. I configured the /etc/gitlab/gitlab.rb with external_url 'http://gitlab.mydomain.com'. Before restoring the database, I’m able to access the UI using root user and it serves all pages over plain HTTP.
However, after restoring the backup, and without changing the external_url, I’m now being redirected to HTTPS. The cURL command on the local machine also gets a 302 to HTTPS:
I suspect that somewhere in the UI of the restored backup is a setting that I must have enabled at one time on the old server to redirect to HTTPS. How would I disable that setting so that I can get to the repo without having to deploy SSL certificates on a proxy? The server is going to be online for a short period and it’s not the production server anyway.
EDIT: Thought to include output of curl before restore:
OK - so discovered that I can navigate to http://gitlab.mydomain.com/users/sign_in and I get to bypass the redirect.
However, now I get the Gitlab Logo and “Gitlab Community Edition” and just whitespace - no username/password prompt!
Slowly getting there.
EDIT:
The site: Sign-in restrictions | GitLab tells me to go the rails console and type in Gitlab::CurrentSettings.update!(password_authentication_enabled_for_web: true)
However, I get the following error:
Please note that the cURL above makes no difference whether I append a / after .com and no difference either whether I have it configure with a trailing / or not in /etc/gitlab/gitlab.rb - the redirect to HTTPS always happens.
However, If I type in anything, even just a mash up of keys on the keyboard - such as above, I’m properly redirected to the plain HTTP site - http://gitlab.mydomain.com/users/sign_in.