Tamwyn Tamwyn - 4 months ago 39
Ruby Question

gitlab-shell ssl cert issues

I've tried now for several hours te set up gitlab and especially gitlab-shell. After being trolled by the documentation I found a sample config, that fitted my needs, but I get an API 500 error :


Running /home/git/gitlab-shell/bin/check
Check GitLab API access: FAILED. code: 500
gitlab-shell self-check failed
Try fixing it:
Make sure GitLab is running;
Check the gitlab-shell configuration file:
sudo -u git -H editor /home/git/gitlab-shell/config.yml
Please fix the error above and rerun the checks.

To explain my current setup:

#/home/git/gitlab-shell/config.yml
user: git
gitlab_url: https://[myfqdn]/
http_settings:
ca_file: "/etc/gitlab-ssl/git-mydomain-chain.pem"
ca_path: "/etc/gitlab-ssl"
self_signed_cert: false
repos_path: "/home/git/repositories/"
auth_file: "/home/git/.ssh/authorized_keys"
redis:
bin: "/usr/bin/redis-cli"
namespace: resque:gitlab
host: localhost
port: 6379
log_level: INFO
audit_usernames: false


In the
/etc/gitlab-ssl
directory are two files:
* my privatekey
git-mydomain-key.pem

* the combinded public key and CA-key git-mydomain-chain.pem


In addition I added the ca-key to the ca-certificates (it's a cacert signed one).

Can anyone help me and tell me what went wrong?

Answer

This error has nothing to do with gitlab. This is pure YAML parser (Psych in your case) error.

Line 5 column 3 is:

ca_path:
⇑ HERE

That said you have a strange unterminated string right above:

                                                 ⇓⇓⇓ WTF?!
ca_file: "/etc/gitlab-ssl/git-mydomain-chain.pem #This file contains my public key and the ca key

Remove everything after hash (inclusive) and close the string quotes.

Hope it helps.