我遇到了一个问题,即尝试通过我的浏览器访问 GitLab 为我提供了一个用于身份验证的弹出窗口。它看起来像一个 .htaccess 身份验证弹出窗口,但我没有使用我的 nginx 配置配置 htaccess 身份验证。
需要身份验证
The server at http://git.servername.com:80 requires a username and password.
The server says: Password Protected.
Username:
Password:
我已经尝试解决这个问题几天了,但我遇到了一些死胡同,因为我在我的 nginx 错误日志或我的 GitLab production.log 中看不到任何信息。
我最近在 Ubuntu 12.04 上安装了 GitLab(遵循本指南:https ://www.digitalocean.com/community/articles/how-to-set-up-gitlab-as-your-very-own-private-github -clone ),并在 OpenVZ 上遇到了一些内存不足的问题。我创建了一些假交换来克服这个障碍,并且我已经验证了 GitLab 服务器正在运行。我的验证和配置信息如下:
GitLab 验证
user@server:/home/git/gitlab$ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
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.0 ? ... OK (1.7.0)
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
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ... can't check, you have no projects
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
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 satellites? ... can't check, you have no projects
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.9.1)
Checking GitLab ... Finished
环境信息
user@server:/home/git/gitlab$ sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System: Ubuntu 12.04
Current User: git
Using RVM: no
Ruby Version: 2.0.0p247
Gem Version: 2.0.3
Bundler Version:1.6.0
Rake Version: 10.1.0
GitLab information
Version: 6.0.2
Revision: 10b0b8f
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://git.servername.com
HTTP Clone URL: http://git.servername.com/some-project.git
SSH Clone URL: git@git.servername.com:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.7.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git
Nginx 配置
在我的 default.conf 文件中:
server {
listen 80;
server_name git.servername.com;
location / {
proxy_pass http://git.servername.com:80;
}
}
我个人机器上的主机文件(不是我的 VPS)
<IP Address of VPS> git.servername.com