26

I set up a fresh CentOS 6.6 install and used the Omniubus installer for the CE of Gitlab.

When running gitlab-ctl reconfigure I get the following errors:

================================================================================ Recipe Compile Error in /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb ================================================================================ RuntimeError ------------ External URL must include a FQDN Cookbook Trace: --------------- /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:95:in `parse_external_url' /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:191:in `generate_config' /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:34:in `from_file' Relevant File Content: ---------------------- /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb: 88: 89: def parse_external_url 90: return unless external_url 91: 92: uri = URI(external_url.to_s) 93: 94: unless uri.host 95>> raise "External URL must include a FQDN" 96: end 97: Gitlab['user']['git_user_email'] ||= "gitlab@#{uri.host}" 98: Gitlab['gitlab_rails']['gitlab_host'] = uri.host 99: Gitlab['gitlab_rails']['gitlab_email_from'] ||= "gitlab@#{uri.host}" 100: 101: case uri.scheme 102: when "http" 103: Gitlab['gitlab_rails']['gitlab_https'] = false 104: when "https" 

The FQDN of the server is correctly set, I have an external IP. DNS is configured for the FQDN to point at my external IP.

Here's the contents of my /etc/gitlab/gitlab.rb in case that is useful:

# Check and change the external_url to the address your users will type in their browser external_url 'gitlab.thefallenphoenix.net' gitlab_rails['gitlab_email_from'] = '[email protected]' 
2
  • postet on october, now middle december, the bug still exists. I don´t get it how they can release software which isn´t even installable Commented Dec 21, 2014 at 14:56
  • This bug also appears from the default install of Digital Ocean's GitLab "One Click Install" app Droplet option on Ubuntu 16.04 Commented Jun 15, 2018 at 17:11

3 Answers 3

73

EDIT: This is now fixed with adding http:// or https:// to the domain in the .rb file. Tested on Debian 9 with Gitlab EE.


Add a = sign to the gitlab.rb.

It should be:

external_url = 'gitlab.thefallenphoenix.net' gitlab_rails['gitlab_email_from'] = '[email protected]' 

After that it should install fine. At least it worked for me on CentOS 6.6.

Sign up to request clarification or add additional context in comments.

6 Comments

Strange that I needed to add that as apart from the 2nd line the file was the default one!
@kemra102 If that's the case consider opening an issue upstream.
Just had same issue, did not notice the missing equals sign! Definitely an issue with omnibus, can someone more in the know notify upstream?
This solution worked for me! I the same problem (I'm also using omnibus, with the default gitlab.rb untouched), except I'm using CentOS 7 rather than 6.6
Actually this is just to make the script shut up. The script just ignores this - as soon as you want to change anything in the url it doesnt work. see JusticeO's answer for a real solution
|
18

Adding the equal (=) sign to the gitlab.rb only solves your problem temporarily! It is not a bug. Using "http://example.com" instead of "example.com" actually solved the problem. *If gitlab installs fine but not accessible via browser, add a port to the url like "http://example.com:10080" and you should be seeing the website http://example.com:10080 in your browser

4 Comments

This is a long term solution, it worked for me as the other accepted answer didn't. Thanks!
where and how can I change this ?
go to /etc/gitlab/gitlab.rb (omnibus gitlab)
how can I do this if I run gitlab in docker container? The container fails before I can log onto it...
1

I upgrade from 6.6.9 to latest gitlab_7.4.3-omnibus.5.1.0.ci-1_amd64.deb

just follow the upgrade instruction before the

gitlab-ctl reconfigure 

vim /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb

 99 def parse_external_url 100 return unless external_url 101 102 uri = URI("http://whatever.example.com") //just change external_url line here 103 104 unless uri.host 105 raise "External URL must include a FQDN" 106 end 107 Gitlab['user']['git_user_email'] ||= "gitlab@#{uri.host}" 108 Gitlab['gitlab_rails']['gitlab_host'] = uri.host 109 Gitlab['gitlab_rails']['gitlab_email_from'] ||= "gitlab@#{uri.host}" 110 111 case uri.scheme 112 when "http" 113 Gitlab['gitlab_rails']['gitlab_https'] = false 114 when "https" 115 Gitlab['gitlab_rails']['gitlab_https'] = true 116 Gitlab['nginx']['ssl_certificate'] ||= "/etc/gitlab/ssl/#{uri.host}.crt" 117 Gitlab['nginx']['ssl_certificate_key'] ||= "/etc/gitlab/ssl/#{uri.host}.key" 118 else 119 raise "Unsupported external URL scheme: #{uri.scheme}" 120 end 121 122 unless ["", "/"].include?(uri.path) 123 raise "Unsupported external URL path: #{uri.path}" 124 end 125 126 Gitlab['gitlab_rails']['gitlab_port'] = uri.port 127 end 

and then do

gitlab-ctr reconfigure 

everything is ok!

2 Comments

external url is configurable at /etc/gitlab/gitlab.rb So just open up /etc/gitlab/gitlab.rb and add http:// in external_url variable to make this work.
I downvoted this option since it is not recommended to change the code if its possible to edit it via a config file.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.