fix: provide git credentials on first attempt - #1072
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Git client configuration so HTTP remotes can proactively send Basic auth credentials, aiming to avoid an initial unauthenticated request/round-trip during remote operations.
Changes:
- Configure git to use
http.proactiveAuth=basicwhen setting up repository config.
Suppressed comments (1)
src/git.ts:56
http.proactiveAuth=basicwill proactively send Basic auth headers; combined with the current behavior where URLs without a scheme default tohttp(seegetProtocol()), this increases the chance of sending credentials over plaintext HTTP. Consider only enabling proactive auth forhttpsremotes (or other explicitly secure protocols).
await this.git.addConfig('http.proactiveAuth', 'basic')
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
src/git.ts:182
- New behavior is introduced to force proactive HTTP Basic auth during the initial clone, but there is no unit test coverage ensuring the clone is invoked with the intended arguments/order. Adding a test would prevent regressions (especially given the subtle ordering requirements of
-c).
await this.git.clone(this.urlAuth, this.path, ['-c', 'http.proactiveAuth=basic'])
CasLubbers
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements a Git client configuration, similar to linode/apl-core#3590.