GitLab API访问失败后升级

问题描述:

我最近更新GitLab到7.14版本,当我运行GitLab API访问失败后升级

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production 

我收到以下错误

Check GitLab API access: FAILED: Failed to connect to internal API 
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. 

我已经gitlab运行的背后有一个反向代理设置了以下规则:

DNAT   net    loc:192.168.122.38:22 tcp  2227 -    <externalip> 
DNAT   net    loc:192.168.122.38:80 tcp  2280 -    <externalip> 
DNAT   net    loc:192.168.122.38:443 tcp  2443 -    <externalip> 

和gitlab-shell/config.yml看起来像

GitLab user. git by default 
user: git 

# Url to gitlab instance. Used for api calls 
gitlab_url: "https://<external_url>:2443/" 

# Repositories path 
repos_path: "/home/git/repositories" 

# File used as authorized_keys for gitlab user 
auth_file: "/home/git/.ssh/authorized_keys" 

ssh_port: 2227 

self_signed_cert: true 
+0

你有没有解决这个问题? – ceebreenk

根据您所描述的问题的配置是gitlab-shell试图访问https GitLab://:2443。但是,您指出只有端口22,80和443被代理。您需要调整gitlab-shell配置,以便它指向本地主机的适当端口或外部URL上的端口443。