2

我在我大学的本地机器上安装了 Gitlab 5.2 + Nginx。通过 http 克隆适用于内部网络中的机器,但尝试从外部网络上的机器克隆会导致“致命:身份验证失败”消息,即使提供了完全相同的凭据。(我使用的凭据与通过 Web 界面登录 Gitlab 的凭据相同)

Gitlab Web 界面可从外部网络访问。只有通过 http 的克隆失败(通过 ssh 克隆是不可能的,因为端口 22 被阻塞)

以下是相关配置文件中的一些行:

来自 config/gitlab.yml

host: mydomain
port: 80
https: false

以下是 ngnix 配置文件中的相关行

server {
  listen *:80 default_server;         # In most cases *:80 is a good idea
  server_name mydomain;     # e.g., server_name source.example.com;
  root /home/git/gitlab/public;

  # individual nginx logs for this gitlab vhost
  access_log  /var/log/nginx/gitlab_access.log;
  error_log   /var/log/nginx/gitlab_error.log;

  location / {
    # serve static files from defined root folder;.
    # @gitlab is a named location for the upstream fallback, see below
    try_files $uri $uri/index.html $uri.html @gitlab;
  }

  # if a file, which is not found in the root folder is requested,
  # then the proxy pass the request to the upsteam (gitlab unicorn)
  location @gitlab {
    proxy_read_timeout 2000; # https://github.com/gitlabhq/gitlabhq/issues/694
    proxy_connect_timeout 2000; # https://github.com/gitlabhq/gitlabhq/issues/694
    proxy_redirect     off;

    proxy_set_header   X-Forwarded-Proto $scheme;
    proxy_set_header   Host              $http_host;
    proxy_set_header   X-Real-IP         $remote_addr;

    proxy_pass http://gitlab;
  }
}

注意:我已将此行添加到 /etc/hosts:127.0.0.1 mydomain但它并没有真正帮助。(基于https://github.com/gitlabhq/gitlabhq/issues/3483#issuecomment-15783597

关于问题可能是什么/我如何调试这个的任何想法?

4

1 回答 1

0

我相信这在 5.3 中已修复,因此请尝试更新。看:

于 2013-07-26T04:47:48.147 回答