我在大学的本地机器上安装了Gitlab 5.2 + Nginx。 Clone over http适用于内部网络中的计算机,但尝试从外部网络上的计算机进行克隆会导致致命错误:身份验证失败"消息,即使提供完全相同的凭据。 (我使用的凭据与我用来通过Web界面登录Gitlab的凭据相同)
可以从外部网络访问Gitlab Web界面。只有通过http的克隆失败(因为端口22被阻止而无法克隆ssh)
以下是相关配置文件中的一些行:
来自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)
关于问题可能是什么/我如何调试这个问题的任何想法?
答案 0 :(得分:0)