gitlab-shell ssl证书问题

时间:2015-01-16 14:08:43

标签: ruby ssl ssl-certificate gitlab

我现在已经尝试了好几个小时,设置了gitlab,尤其是gitlab-shell。在被文档拖累后,我发现了一个符合我需求的示例配置,但是我收到了API 500错误: 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

#/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

此外,我将ca-key添加到ca-certificates(它是一个cacert签名的)。

任何人都可以帮助我并告诉我出了什么问题吗?

1 个答案:

答案 0 :(得分:1)

此错误与gitlab无关。这是纯YAML解析器(在您的情况下为Psych)错误。

第5行第3列是:

ca_path:
⇑ HERE

那说你上面有一个奇怪的未终止的字符串:

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

删除散列后的所有内容(包括)并关闭字符串引号。

希望它有所帮助。