dhirajkk91 opened a new pull request, #75917: URL: https://github.com/apache/airflow/pull/75917
Git only sends credentials after the server answers with a 401, and public repositories never do. So the token on a Git connection was never used for them, and every bundle fetch counted against the host's anonymous rate limit. Git 2.46 added `http.<url>.proactiveAuth`, which sends the credential on the first request. The hook now sets it to `basic`, scoped to the repository URL, next to the credential helper it already configures. This is only done for https, never plain http. On an older git it logs a warning once and behaves as before. Two earlier attempts exist. #70204 used the same approach but went stale and was closed, so this is that idea on top of the current credential helper code. #74938 adds a `git_config` extra so users can set `proactiveAuth` themselves. That is more flexible, but opt-in, so existing connections stay rate limited until someone edits them. The two can coexist, but both change `_token_credential_env`, so whichever lands second needs a rebase. I'm happy to rebase, rework this on top of #74938, or drop it if maintainers prefer that direction. Tests cover the config entries (https, plain http, older git), the version check, and one test that runs a real `git ls-remote` against a local https server that never asks for credentials and checks the token still arrives. That one is skipped on git older than 2.46. Unit tests pass on git 2.43 and 2.56, and ruff and mypy are clean. The provider.yaml pre-commit hook was skipped locally because it needs the Docker CI image. closes: #54829 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Claude Opus 5.5 and Claude Sonnet 5.5) Claude code helped my understand the codebase. I wrote the initial bug fix but then was reviewed and it cut it down to the proactive-auth fix. I have reviewed and understand the fixes made here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
