2
我在我的大学的本地计算机上安装了Gitlab 5.2 + Nginx。通过http克隆适用于内部网络中的机器,但尝试从外部网络上的计算机进行克隆会导致“致命:身份验证失败”消息,即使提供了完全相同的凭据。 (我使用与通过Web界面登录Gitlab相同的凭证)通过http进行的Gitlab克隆无法通过外部网络进行身份验证
可从外部网络访问Gitlab Web界面。只有通过http失败的克隆(克隆通过ssh是不可能的,因为端口22被阻塞)
下面是从相关的配置文件的一些线路:
从配置/ gitlab.ymlhost: 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)
任何想法可能是/我该如何调试?
只是为了澄清 - 我不使用LDAP身份验证。奇怪的是,git over http实际上是从内部网络运行的。当我尝试从外部网络执行它时,它只会失败。 – Anirudh