双重检查GitLab安装:gitlab-shell自检失败

Lea*_*cia 5 git gitlab

我安装了GitLab,一切似乎都很好.直到我通过运行仔细检查应用程序的状态:sudo -u git -H editor /home/git/gitlab-shell/config.yml.此项目为红色,似乎有错误:

  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.
Run Code Online (Sandbox Code Playgroud)

我尝试打开,config.yml但我似乎没有发现任何异常.你觉得我错过了什么?

此外,我有一个自定义SSH连接.从这个解释我不明白:

Custom SSH Connection

If you are running SSH on a non-standard port, you must change the gitlab user's SSH config.

# Add to /home/git/.ssh/config
host localhost          # Give your setup a name (here: override localhost)
    user git            # Your remote git user
    port 2222           # Your port number
    hostname 127.0.0.1; # Your server name or IP
You also need to change the corresponding options (e.g. ssh_user, ssh_host, admin_uri) in the config\gitlab.yml file.
Run Code Online (Sandbox Code Playgroud)

出于迷失,我没有这个/home/git/.ssh/config,我应该创建一个还是我只是缺少一些东西?

我的电话堆栈:

Checking Environment ...

Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 1.7.4 ? ... OK (1.7.6)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
update hook up-to-date? ... yes
update hooks in repos are links: ... can't check, you have no projects
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: /usr/local/lib/ruby/2.0.0/net/http.rb:878:in `initialize': getaddrinfo: Name or service not known (SocketError)
        from /usr/local/lib/ruby/2.0.0/net/http.rb:878:in `open'
        from /usr/local/lib/ruby/2.0.0/net/http.rb:878:in `block in connect'
        from /usr/local/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
        from /usr/local/lib/ruby/2.0.0/net/http.rb:877:in `connect'
        from /usr/local/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
        from /usr/local/lib/ruby/2.0.0/net/http.rb:851:in `start'
        from /home/git/gitlab-shell/lib/gitlab_net.rb:62:in `get'
        from /home/git/gitlab-shell/lib/gitlab_net.rb:29:in `check'
        from /home/git/gitlab-shell/bin/check:11:in `<main>'
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.

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking GitLab ...

Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ... can't check, you have no projects
Projects have satellites? ... can't check, you have no projects
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/local/bin/git"
Git version >= 1.7.10 ? ... yes (1.8.4)

Checking GitLab ... Finished
Run Code Online (Sandbox Code Playgroud)

Von*_*onC 11

它可能类似于问题5437:

我遇到了在我的debian wheezy 7.2服务器上进行干净安装的完全相同的问题.

我做了两个更改并重新启动了服务器(没问题,因为它只是一个测试服务器):

  • 请确保您的域指向127.0.0.1/etc/hosts(我的服务器上它指127.0.1.1)
  • 添加/home/git/.ssh/config安装过程中提到的非标准ssh端口

在这种情况下,域设置为127.0.0.1/etc/hosts已经足够了.

其他可能的问题:问题5426:错误的sidekick命令

这种启动sidekiq的方式不再适用.你必须使用:

sudo -u git -H RAILS_ENV=production script/background_jobs start
Run Code Online (Sandbox Code Playgroud)

一个http.rb:xxx:in初始化':的getaddrinfo:姓名或服务不知道(SocketError)`错误消息是出现在:


OP莱昂德罗·加西亚证实的评论:

我忘了设置我提供的域名gitlab_url.
在我的域名提供商上添加并更正DNS可解决此问题