Git over HTTP 在 Apache error_log 中生成身份验证失败

2023-12-21

我的 Git over HTTP(s) 设置遇到了非常烦人的问题。尽管它可以通过 HTTP 运行,但我在 Apache 的 error_log 中收到一条错误消息,指出身份验证失败。我尝试跟踪 Apache 和 git 客户端之间的通信,似乎 git 客户端导致了该问题。

客户端在开始进行身份验证之前会尝试加载页面两次。这会在 Apache 的 error_log 中生成一条错误消息。有谁有任何建议如何解决这个问题?这在生产中真的很烦人(我收到了数千个这样的错误)。

________________________________________________________________________________
| [email protected] /cdn-cgi/l/email-protection [/Users/hologos/Work/Projects/scm/testing-repos/dev/test-opravneni] 
| => GIT_CURL_VERBOSE=1 git pull
* Couldn't find host git-server.local in the .netrc file; using defaults
*   Trying 172.24.144.56...
* Connected to git-server.local (172.24.144.56) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate: git-server.local
> GET /dep/bso/test-opravneni.git/info/refs?service=git-upload-pack HTTP/1.1
Host: git-server.local
User-Agent: git/2.10.1 (Apple Git-78)
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

< HTTP/1.1 401 Unauthorized
< Date: Tue, 23 May 2017 11:09:42 GMT
< Server: Apache/2.4.23 (Unix) OpenSSL/1.0.1e-fips PHP/5.6.24
< WWW-Authenticate: Basic realm="GitList"
< Content-Length: 381
< Content-Type: text/html; charset=iso-8859-1
< 
* Ignoring the response-body
* Connection #0 to host git-server.local left intact
* Issue another request to this URL: 'https://[email protected] /cdn-cgi/l/email-protection/dep/bso/test-opravneni.git/info/refs?service=git-upload-pack'
* Couldn't find host git-server.local in the .netrc file; using defaults
* Found bundle for host git-server.local: 0x7fe86b50fc10
* Re-using existing connection! (#0) with host git-server.local
* Connected to git-server.local (172.24.144.56) port 443 (#0)
* Server auth using Basic with user 'hologos'
> GET /dep/bso/test-opravneni.git/info/refs?service=git-upload-pack HTTP/1.1
Host: git-server.local
Authorization: Basic bWFsZWtqaXI6
User-Agent: git/2.10.1 (Apple Git-78)
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

< HTTP/1.1 401 Unauthorized
< Date: Tue, 23 May 2017 11:09:42 GMT
< Server: Apache/2.4.23 (Unix) OpenSSL/1.0.1e-fips PHP/5.6.24
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="GitList"
< Content-Length: 381
< Content-Type: text/html; charset=iso-8859-1
< 
* Connection #0 to host git-server.local left intact
* Couldn't find host git-server.local in the .netrc file; using defaults
* Found bundle for host git-server.local: 0x7fe86b50fc10
* NTLM-proxy picked AND auth done set, clear picked!
* Hostname git-server.local was found in DNS cache
*   Trying 172.24.144.56...
* Connected to git-server.local (172.24.144.56) port 443 (#1)
* SSL re-using session ID
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate: git-server.local
* Server auth using Basic with user 'hologos'
> GET /dep/bso/test-opravneni.git/info/refs?service=git-upload-pack HTTP/1.1
Host: git-server.local
Authorization: Basic bWFsZWtqaXI6NFdlZWR5ZmFpbGFtZW5sZXZlbGJlaGluZA==
User-Agent: git/2.10.1 (Apple Git-78)
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

< HTTP/1.1 200 OK
< Date: Tue, 23 May 2017 11:09:42 GMT
< Server: Apache/2.4.23 (Unix) OpenSSL/1.0.1e-fips PHP/5.6.24
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Transfer-Encoding: chunked
< Content-Type: application/x-git-upload-pack-advertisement
< 
* Connection #1 to host git-server.local left intact
Already up-to-date.

这是 error_log 的输出:

________________________________________________________________________________
| [email protected] /cdn-cgi/l/email-protection [/Users/hologos/Work/Projects/scm/testing-repos/dev/test-opravneni] 
| => tail error_log
[Tue May 23 13:08:59.666633 2017] [auth_basic:error] [pid 16683] [client 10.0.0.2:54455] AH01617: user hologos: authentication failure for "/dep/bso/test-opravneni.git/info/refs": Password Mismatch

Edit

我再次查看了一下,发现 git 客户端发出了额外的 GET 请求,导致了这个错误。我向 git 开发团队报告了这一点。

这是curl通信的输出:

________________________________________________________________________________
| [email protected] /cdn-cgi/l/email-protection [/Users/hologos] 
| => curl -v --anyauth --user "hologos:password" --silent 'https://git-server.local' 1>/dev/null
* Rebuilt URL to: https://git-server.local/
*   Trying 172.26.232.51...
* Connected to git-server.local (172.26.232.51) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate: git-server.local
> GET / HTTP/1.1
> Host: git-server.local
> User-Agent: curl/7.43.0
> Accept: */*
> 
< HTTP/1.1 401 Unauthorized
< Date: Tue, 20 Feb 2018 15:49:15 GMT
< Server: Apache/2.4.23 (Unix) OpenSSL/1.0.1e-fips PHP/5.6.24
< WWW-Authenticate: Basic realm="GitList"
< Content-Length: 381
< Content-Type: text/html; charset=iso-8859-1
< 
* Ignoring the response-body
{ [381 bytes data]
* Connection #0 to host git-server.local left intact
* Issue another request to this URL: 'https://git-server.local/'
* Found bundle for host git-server.local: 0x7fe783412d10
* Re-using existing connection! (#0) with host git-server.local
* Connected to git-server.local (172.26.232.51) port 443 (#0)
* Server auth using Basic with user 'hologos'
> GET / HTTP/1.1
> Host: git-server.local
> Authorization: Basic bWFsZWtqaXI6NEJhZ2dhZ2VzaHl0YW1wZXJwYXJhbHlzaXN3aXNo
> User-Agent: curl/7.43.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Tue, 20 Feb 2018 15:49:15 GMT
< Server: Apache/2.4.23 (Unix) OpenSSL/1.0.1e-fips PHP/5.6.24
< X-Powered-By: PHP/5.6.24
< Cache-Control: no-cache
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
< 
{ [7 bytes data]
* Connection #0 to host git-server.local left intact

None

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Git over HTTP 在 Apache error_log 中生成身份验证失败 的相关文章

随机推荐

  • 尝试使用风味时 Flutter 应用程序构建失败

    我正在尝试在我的应用程序中使用风味 我遵循了各种指南 但每次都因同样的问题而无法构建 因为基本上每个博客文章和 SE 问题都引用相同的文章和资源 所以我不会再这样做了 为了调试 我决定简化问题并启动一个新项目 正常示例项目 并添加风味 每种
  • iOS 上的 OnAppearing 方法

    当我的应用程序位于后台并转到前台时 OnAppearing 方法在 IOS 中不起作用 或者当手机锁定然后解锁并且应用程序位于前台时 不会调用 OnAppearing 方法 在 Android 上一切正常 我在下面找到了这个指南 但仍然不起
  • 夜间模式颜色不适用于回收站视图背景

    我想为我的 Android 应用程序实现夜间模式 因此我使用 Theme AppCompat DayNight 主题来实现夜间模式 但我必须在夜间模式期间自定义工具栏和回收器视图的颜色 为此 我已在 attrs xml 文件中声明了该属性
  • ConnectivityManager.getBackgroundDataSetting() 已弃用,该使用什么替代?

    以前可以使用 ConnectivityManager getBackgroundDataSetting 检查用户是否有后台数据设置 true 此方法现已弃用 http developer android com reference andr
  • Selenium 中的计时页面加载时间

    我正在使用 selenium 在我的网站上记录一些性能测试 例如登录时间 查询时间等 我在 Selenium IDE 上记录了一个示例脚本 我现在让它运行一个 Selenium RC java public void testNew thr
  • Microsoft Visual Studio 2010 支持 c99 吗?

    我想知道 Microsoft Visual Studio 2010 是否支持 C99 如果没有 我如何使用标准类型 例如intptr t and uintptr t Visual Studio 2010 不支持 C99 语法 stdint
  • 为什么列表理解比附加到列表快得多?

    我想知道为什么列表理解比附加到列表快得多 我以为差异只是表达性的 但事实并非如此 gt gt gt import timeit gt gt gt timeit timeit stmt t for i in range 10000 t app
  • tensorflow变量初始化错误:尝试使用未初始化的值变量

    为什么会发生这种情况 错误消息 尝试未初始化变量错误 https i stack imgur com 0rcrd jpg这是我的来源 来源 使用张量流在计算机中学习 JPG 图像 https i stack imgur com kxh4c
  • 随机测试用例失败 - Forked JVM 异常退出。

    我有一套 Junit 测试 每次在本地运行时都会通过 我已经设置了一个作业来运行该套件 hudson 使用 ANT 来调用测试 该套件在 hudson 机器中传递了相当长的一段时间 但从过去 3 天开始 一项测试有时会失败 随机 而且我们还
  • Facebook 不会在 iOS 应用程序的仪表板上跟踪应用程序安装情况

    我在developers facebook com 上创建Facebook 应用程序 根据以下内容在我的 iOS 应用程序中配置和集成 Facebook SDK脸书指南 https developers facebook com docs
  • 如何安装 Windows 10 SDK 以与 Visual Studio 2017 一起使用

    我不知道如何安装适用于 Visual Studio 2017 的 Windows 10 SDK 我下载并运行了 Windows 10 SDK 安装程序 它显示Please find winsdksetup exe in Windows ki
  • 配置单元更新最后访问时间

    我想更新 hive 表上的lastAccessTime 在网上google后 我得到了一个解决方案 set hive exec pre hooks org apache hadoop hive ql hooks UpdateInputAcc
  • iOS 13 中 Core Data 持久存储迁移期间发生错误

    将 XCode 更新到版本 11 后 我向 Core Data 添加了新的模型版本 并在新版本中向实体添加了新属性 使新版本处于活动状态并将新属性添加到托管对象文件中 向用户发布此版本后 它开始崩溃并显示以下消息 用于打开持久存储的托管对象
  • 文本区域内的 HTML 解码

    我在使用我构建的网站管理工具时遇到问题 它允许我编辑网站的文章 我使用 google code prettify 因为我的文章是关于 C 编程的 然后我使用 pre class prettyprint pre 标签来指定我即将开始编写 C
  • 如何防止 json.jar 中的 JSONObject 将十进制数字字符串转换为双精度

    Using JSONObject从服务器读取 json 响应 服务器返回一些十进制数 正常数字不是问题 但当存在小数形式时就会出现问题0 00068 像这样的数字0 00068会自动存储到Double对象 并且当尝试检索此类数字时 会返回该
  • 左侧省略号出现奇怪的特殊字符问题

    我有一些文件路径 我试图使用下面的代码在左侧显示省略号 ellipsis after content background color white color transparent position relative z index 2
  • VB.NET 与这种创建实例的方式等效的是什么?

    在 C 中 您可以创建这样的实例 Custom mycustomelement new Custom ElenentName My Custom Element 我想知道如何在 Visual Basic 中创建这样的实例以及这种类型的创建实
  • 使用 DATEVALUE 函数时 Excel #Value 错误

    In cell A2 I have 7 21 2014 12 44 36 PM 当我使用DATEVALUE LEFT A2 FIND A2 1 我收到错误 VALUE 当我使用LEFT A2 FIND A2 1 I get 7 21 201
  • 铁路路线和站点性能

    站点速度与Rails 应用程序的routes rb 文件中的命名空间 路由数量是否有直接关联 我正在处理一个相当大的应用程序 其中包含 30 多个不同的模型 实体 并且大多数资源都有自己的路由 路由的数量会影响内存开销 这就是为什么 Rai
  • Git over HTTP 在 Apache error_log 中生成身份验证失败

    我的 Git over HTTP s 设置遇到了非常烦人的问题 尽管它可以通过 HTTP 运行 但我在 Apache 的 error log 中收到一条错误消息 指出身份验证失败 我尝试跟踪 Apache 和 git 客户端之间的通信 似乎