作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经成功安装了 GitLab 来管理私有(private)存储库(这太棒了!)。
我遇到的问题是默认情况下,当有人点击我的子域时会显示 Gitlab 登录。我想在用户获得 GitLab 登录屏幕之前用 basic_auth 层保护整个区域。不幸的是,这破坏了我在启用 GitLab 时推/拉的能力。
我的 nginx 配置启用 basic_auth:
auth_basic "Restricted";
auth_basic_user_file htpasswd;
最佳答案
将此添加到 /etc/gitlab/gitlab.rb
:
nginx['custom_gitlab_server_config'] = "auth_basic 'Restricted';\n auth_basic_user_file htpasswd;\n"
gitlab-ctl reconfigure
关于nginx - 在 nginx 后面使用 GitLab 启用了 basic_auth?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16022977/
我正在用 Ruby 编写一些代码...但我无法弄清楚基本身份验证如何与 Crystal-lang 一起工作。 在 ruby 中,我必须始终使用 request.basic_auth 但这在 Cry
我已经成功安装了 GitLab 来管理私有(private)存储库(这太棒了!)。 我遇到的问题是默认情况下,当有人点击我的子域时会显示 Gitlab 登录。我想在用户获得 GitLab 登录屏幕之前
我是一名优秀的程序员,十分优秀!