Fedora 25 上的 gitlab 为 403,Nginx 为 403

Fedora 25 上的 gitlab 为 403,Nginx 为 403

我按照文档在 Fedora 25 中从源代码安装 gitlab。所有这些看起来都是正确的。

但如果我运行sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production,它会返回这个。

check GitLab API access: FAILED. code: 403
gitlab-shell self-check failed
  Try fixing it:
  Make sure GitLab is running;
  Check the gitlab-shell configuration file:
  sudo -u git -H editor /home/git/gitlab-shell/config.yml
  Please fix the error above and rerun the checks.

并且该站点是403。参见网址

我的服务器上还有其他带有 nginx 的站点,我也将 nginx 与 apache(端口 8000)一起使用。另一个站点可以正常工作。看网址

我不知道如何处理它。我尝试将 gitlab 文件的权限更改为775,但没有任何改变。

我认为redis设置是正确的,因为我安装gitlab时没有出现redis的错误或警告。

gitlib-shell/config.yml 在这里:

---
user: git
gitlab_url: https://git.vonfry.name
http_settings:
  self_signed_cert: false
  ca_file: "/letsencrypt/path/fullchain.pem"
auth_file: "/home/git/.ssh/authorized_keys"
redis:
  bin: "/bin/redis-cli"
  namespace: resque:gitlab
  host: localhost
  port: 6379
log_level: INFO
audit_usernames: false

日志文件 /var/log/nginx/gitlab_error.log

2017/02/28 14:43:27 [crit] 3189#0: *1 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab-workhorse.socket failed (13: Permission denied) while connecting to upstream, client: 117.136.45.138, server: git.vonfry.name, request: "GET / HTTP/2.0", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab-workhorse.socket:/", host: "git.vonfry.name"
2017/02/28 14:43:27 [error] 3189#0: *1 open() "/home/git/gitlab/public/502.html" failed (13: Permission denied), client: 117.136.45.138, server: git.vonfry.name, request: "GET / HTTP/2.0", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab-workhorse.socket/", host: "git.vonfry.name"

答案1

我已经找到原因了。

对于 ubuntu 或 debine,默认用户目录是 755。但在 fedora 中是 700。我必须将其设置为755。

网站可以查看,但是还有其他问题需要解决。

相关内容