git/list[1] front-page[2] threads[3] people[4] search[5] about
 

bug: git credentials helper strips wwwauth[] on HTTP redirect

From
AAAdien Akhmad <adien.akhmad@gmail.com>
Date
Aug 5, 2026, 09:06 UTC
Message-ID
<CADoNwcscDrx+YcfbcW4YKONDZZQgnPiwEOxL4QYV_C7_=FOFcg@mail.gmail.com>

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

Ran `git push` to a remote whose URL 301-redirects to a new path before the server responds 401 with a WWW-Authenticate header.

What did you expect to happen? (Expected behavior)

wwwauth[] to be passed to my credential helper, as it is when pushing to the same server without a redirect.

What happened instead? (Actual behavior)
wwwauth[] was empty, so the helper couldn't detect the auth scheme.
What's different between what you expected and what actually happened?
The redirect causes wwwauth[] to be dropped
Anything else you want to add:

The credential helper in context is https://github.com/hickford/git-credential-oauth The server is a self hosted forgejo https://forgejo.org/

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info]
git version:
git version 2.55.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
rust: disabled
feature: fsmonitor--daemon
gettext: enabled
libcurl: 8.15.0
OpenSSL: OpenSSL 3.5.7 9 Jun 2026
zlib-ng: 2.3.3
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1
uname: Linux 7.1.5-101.fc43.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 28
14:24:13 UTC 2026 x86_64
compiler info: gnuc: 15.2
libc info: glibc: 2.42
$SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks] not run from a git repository - no hooks to show

Message 1 of 1 in “bug: git credentials helper strips wwwauth[] on HTTP redirect”
  1. Adien AkhmadAug 5, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.