我已经为一个我仍然无法解决的问题而挣扎了一段时间。我会非常感谢你的帮助!我所做的: 1)在我的服务器中的Ubuntu16.04.1lts虚拟机上安装gitlab (8.9.6-ce.0),遵循http://docs.gitlab.com/omnibus/docker/README.html 2)在本地安装一个用户,并为同一局域网>>中的机器推送一些项目--所有工作正常3)添加一个新的映射到我的防火墙以映射gitlab- machine -ip:80 > example.org:8138,这样我就可以用http访问gitlab了。
现在我可以在http://example.org:8138上访问web接口并使用它了:用于克隆项目的URL显示错误,因为它们错过了:8138端口(它们从传递给码头容器的-宿主设置中获取example.org部件)。如果我手动将我的自定义端口添加到URLs,则克隆工作正常。
我想解决这个问题,所以尝试在external_url设置gitlab.rb中将它设置为: external_url 'http://example.org:8138‘并重新启动(也尝试手动调用gitlab.rb配置)
状态是,如果我只是注释掉http://example.org:8138设置的ERR_CONNECTION_REFUSED,那么就不能再访问WEB界面了,在浏览器中获取external_url (除了URL中缺少的端口之外)。
我读过一堆问题报告,但都没有帮助解决这个问题:https://gitlab.com/gitlab-org/omnibus-gitlab/issues/244 >>(我没有使用外部NGINX)在我读到这个:https://gitlab.com/gitlab-org/gitlab-ce/issues/20131之后,也尝试更新到8.11,但是没有帮助。
我真的不知道这里发生了什么。gitlab-rake gitlab:env:info和gitlab-rake gitlab的输出:检查如下
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.3.1p112
Gem Version: 2.6.6
Bundler Version:2.3.0
Rake Version: 10.5.0
Sidekiq Version:4.1.4
GitLab information
Version: 8.11.3
Revision: 6cd4edb
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: http://example.org:8138
HTTP Clone URL: http://example.org:8138/some-group/some-project.git
SSH Clone URL: git@example.org:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 3.4.0
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
Checking GitLab Shell ...
GitLab Shell version >= 3.4.0 ? ... OK (3.4.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
telemed / banca ... ok
telemed / calcolatrice ... ok
telemed / chat ... ok
telemed / collections ... ok
telemed / interfacce ... ok
telemed / partite ... ok
telemed / polimorfismo ... ok
telemed / ristoranti ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
projects have namespace: ...
telemed / banca ... yes
telemed / calcolatrice ... yes
telemed / chat ... yes
telemed / collections ... yes
telemed / interfacce ... yes
telemed / partite ... yes
telemed / polimorfismo ... yes
telemed / ristoranti ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.1)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.7.4)
Active users: 4
Checking GitLab ... Finished
发布于 2016-09-08 05:10:53
我自己解决了这个问题。当您在external_url中更改gitlab.rb参数时,会产生副作用(如果您问我的话,在文档中解释得不太清楚!)该nginx现在将运行在您放置在http://example.org8138中的端口上。
因为我通过防火墙将端口80映射到我的外部URL上,所以gitlab网站就无法再访问了。我建议在文档中明确指出,更改external_url (如果包括端口号)将导致nginx和网站在与标准80不同的端口上运行http!
希望这能帮助其他有类似于我的:slight_smile的问题的人:
https://stackoverflow.com/questions/39351563
复制相似问题