bug: git credentials helper strips wwwauth[] on HTTP redirect
Adien Akhmad <[email protected]> Wed, 5 Aug 2026 16:06:05 +0700
| Newsgroups | org.kernel.vger.git |
|---|---|
| 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