gitlabgitlab-7

Gitlab redirecting loop


yesterday I installed gitlab on a vm of mine and configured everything to work with it.

Gitlab listens on port 8081 of my domain (e.g. domain:8081).

I have an apache instance which listens to port 80 and 443, so I did a forward there (e.g. domain/git).

Everything worked fine (except the css theme of domain/git, but thats no problem), but then I changed the root url (I think, I don't know how this settings is called) in the admin section directly in gitlab to http://domain/git to let gitlab show me directly this url if I want to copy a URL to clone.

Now I can't access my gitlab instance, because I do have an redirection loop.

I also can't find where the setting was done by gitlab itself, I guess it's stored in the database and not any file.

Can someone help me figure out how to change this particular configuration back to default?

Thanks in advance!


Solution

  • You likely changed the 'homepage url' used for redirecting logged out users. Instead of hitting the domain mainpage, hit /users/sign_in and you should be able to sign back in as your admin user. Go to the admin section, and clear out the setting.

    You instead need to go into your config/gitlab.yml (source install) or /etc/gitlab/gitlab.rb (package install) and set the external_url to be the address you wanted.

    Then restart/reconfigure the app to have it used in the git clone instructions.