2

what to do to fix this?

Thank you!

Image Error

sudo -u git bin/check
Check GitLab API access: FAILED. code: 404

4 Answers 4

3

A simple search - https://github.com/gitlabhq/gitlab-shell/issues/37 reveals that URL set in config.yml for gitlab-shell is incorrect and causes 404 error.

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

1 Comment

This was the answer that made me look closer at config.yml. I'd given Gitlab a custom port on nginx, but forgotten to set this in the URL field. In my case, http://localhost:8234/ solved the issue.
1

If you still get 404, review the vhost config. Next you can find an example from a Mac OS X apache machine:

<VirtualHost *:443>

  ServerName domain.com
  DocumentRoot "/Users/git/gitlab/public"
  CustomLog /var/log/apache2/access_log combinedvhost
  ErrorLog /var/log/apache2/error_log

  <IfModule mod_ssl.c>
    SSLEngine On
    SSLProxyEngine On
    SSLCertificateFile "/etc/certificates/domain.com.cert.pem"
    SSLCertificateKeyFile "/etc/certificates/domain.com.key.pem"
    SSLCertificateChainFile "/etc/certificates/domain.com.chain.pem"
  </IfModule>

  ProxyPass /uploads !

  ProxyRequests     Off
  ProxyPreserveHost On
  ProxyPass / http://127.0.0.1:8080/

  <Location />
    ProxyPassReverse /
    Order deny,allow
    Allow from all
  </Location>

</VirtualHost>

Cheers,

Comments

0

Make sure in /home/git/gitlab-shell/config.yml gitlab_url: "hostname.example.com" is set to the correct FQDN of the gitlab server. Sometimes it helps if you add the hostname information in /etc/hosts too.

Most of the time when I see this error it's due to a DNS problem.

Comments

0

I was having the same issue and it in the end it ended up being an issue with my virtualhosts setup in apache.

2 Comments

Could you elaborate? At first glance this seems like a "me too" which people flag.
There were a few issues actually. I received the 404 because the gitlab url was a virtualhost, and I forgot to set the NameVirtualHost directive properly. So instead of hitting my gitlab url it was hitting the centos welcome to apache page. I then received the 302 error because it was being redirected from http to https. I just set the url to gitlab in the config.yml and gitlab.yml and now everything is working properly. If you hit these URLS with your browser it may give you more information about what Apache is actually returning.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.