AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-1091836

Jonathan Lawson's questions

Martin Hope
Jonathan Lawson
Asked: 2019-09-20 02:27:27 +0800 CST

尝试使用 Active Directory 身份验证推送到 GitLab 时出现 500 错误

  • 5

我们目前使用 SubVersion,但正在寻求迁移到基于 Git 的解决方案,以便能够进行预提交代码审查。要求是中央 Git 存储库托管在本地,具有可视化前端以允许管理项目,并使用 Active Directory 身份验证。

作为试用,我在运行 Ubuntu 服务器 18.04 的虚拟机上安装了 GitLab EE。我已经使用以下配置设置了 AD 身份验证:

gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
 main:
  label: 'MyOrganisation'
  host: '172.16.0.6'
  port: 389
  uid: 'sAMAccountName'
  bind_dn: 'CN=ldapbinduser,CN=Users,DC=myorganisation,DC=com'
  password: 'password' 
  timeout: 30
  active_directory: true
  allow_username_or_mail_login: false
  lowercase_usernames: true
  block_auto_created_users: true
  base: 'OU=Software,OU=Engineering,DC=myorganisation,DC=com'
  group_base: 'OU=Software,OU=Engineering,DC=myorganisation,DC=com'
  admin_group: 'internal software dept'
EOS

这已经部分成功。GitLab 登录页面中会出现一个 MyOrganisation 选项卡,软件组的成员可以使用其 AD 登录名和密码登录,而非成员则不能。“Internal Software Dept”组的成员不会自动分配管理员权限,但这很好,因为我们可以手动添加它们。

当尝试将 SVN 存储库的历史推送到 GitLab 或克隆存储库时,就会出现问题。我在 GitLab 中创建了一个内部软件组,并使用 readme.txt 文件向其中添加了一个 TestProject 项目。在我的 Windows 10 PC 上,我安装了适用于 Windows 的 Git Credential Manager。当我尝试使用以下命令将其克隆到我的 PC 时: git clone http://gitlab/internal-software/testproject.git 我收到以下消息:

致命:无法访问“ http://gitlab/internal-software/testproject.git/ ”:请求的 URL 返回错误:500 WireShark 显示两次尝试以 401 连接 - 第一次未授权响应,然后是 500 -内部服务器错误响应第二个:

1   local IP    gitlab IP   TCP 66  59710 → 80 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 WS=256 SACK_PERM=1
2   gitlab IP   local IP    TCP 66  80 → 59710 [SYN, ACK] Seq=0 Ack=1 Win=29200 Len=0 MSS=1460 SACK_PERM=1 WS=128
3   local IP    gitlab IP   TCP 54  59710 → 80 [ACK] Seq=1 Ack=1 Win=525568 Len=0
4   local IP    gitlab IP   HTTP    241 GET /internal-software/testproject.git/info/refs?service=git-upload-pack HTTP/1.1
5   gitlab IP   local IP    TCP 60  80 → 59710 [ACK] Seq=1 Ack=188 Win=30336 Len=0
6   gitlab IP   local IP    HTTP    618 HTTP/1.1 401 Unauthorized  (text/plain)
7   local IP    gitlab IP   TCP 54  59710 → 80 [ACK] Seq=188 Ack=565 Win=524800 Len=0
8   local IP    gitlab IP   HTTP    292 GET /internal-software/testproject.git/info/refs?service=git-upload-pack HTTP/1.1 
9   gitlab IP   local IP    TCP 60  80 → 59710 [ACK] Seq=565 Ack=426 Win=31360 Len=0
10  gitlab IP   local IP    TCP 1514    80 → 59710 [ACK] Seq=565 Ack=426 Win=31360 Len=1460 [TCP segment of a reassembled PDU]
11  gitlab IP   local IP    TCP 1514    80 → 59710 [ACK] Seq=2025 Ack=426 Win=31360 Len=1460 [TCP segment of a reassembled PDU]
12  gitlab IP   local IP    HTTP    309 HTTP/1.1 500 Internal Server Error  (text/html)
13  local IP    gitlab IP   TCP 54  59710 → 80 [ACK] Seq=426 Ack=3740 Win=525568 Len=0
14  local IP    gitlab IP   TCP 54  59710 → 80 [RST, ACK] Seq=426 Ack=3740 Win=0 Len=0

500 – Internal Server Error 响应的内容是标准的 GitLab 500 –“哎呀,我们这边出了点问题”页面。

在服务器上,我浏览了 var/logs/gitlab/gitlab-rails 中的 .log 文件,并在 production_json.log 中找到了这个:

{"method":"GET","path":"/internal-software/testproject/git/info/refs","format":" / ","controller":"Projects::GitHttpController","action" :"info_refs","status":401,"duration":35.81,"view":1.05,"db":9.7,"time":"2019-09-19T08:37:55.371Z","params": [{"key":"service","value":git-upload-pack"},{"key":"namespage_id","value":"internal-software"},{"key":"project_id" "value":"testproject.git"}],"remote_ip":"172.16.1.46","user_id":null,"username":null,"ua":git/2.17.0.windows.1", "queue_duration":null,"correlation_id":"long_uid"} {"method":"GET","path":"/internal-software/testproject/git/info/refs","format":" /","controller":"Projects::GitHttpController","action":"info_refs","status":500,"error":"ArgumentError: 必须提供加密或方法","duration":215.3,"view ":0.0,"db":14.11,"time":"2019-09-19T08:37:55.803Z","params":[{"key":"service","value":git-upload-pack "},{"key":"namespage_id","value":"internal-software"},{"key":"project_id","value":"testproject.git"}],"remote_ip":"172.16 .1.46","user_id":null,"username":null,"ua":git/2.17.0.windows.1","queue_duration":null,"correlation_id":"long_uid"}

这些似乎与上面的 HTTP 请求和响应相匹配。第一个是401,第二个是500。

错误消息是 ArgumentError:必须提供加密或方法 我已尝试在 GitLab 站点、Stack Overflow、Stack Exchange 和一些知名搜索引擎上搜索此内容,但只能得到与我的问题不匹配的近似结果。

active-directory gitlab
  • 1 个回答
  • 1864 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve