Skip to content

fix: provide git credentials on first attempt - #1072

Merged
CasLubbers merged 2 commits into
mainfrom
APL-1966
Aug 25, 2026
Merged

fix: provide git credentials on first attempt#1072
CasLubbers merged 2 commits into
mainfrom
APL-1966

Conversation

@merll

@merll merll commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Implements a Git client configuration, similar to linode/apl-core#3590.

Copilot AI lite review requested due to automatic review settings August 24, 2026 13:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=basic when setting up repository config.
Suppressed comments (1)

src/git.ts:56

  • http.proactiveAuth=basic will proactively send Basic auth headers; combined with the current behavior where URLs without a scheme default to http (see getProtocol()), this increases the chance of sending credentials over plaintext HTTP. Consider only enabling proactive auth for https remotes (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.

Comment thread src/git.ts
Comment thread src/git.ts
Copilot AI review requested due to automatic review settings August 24, 2026 14:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'])

Comment thread src/git.ts
@CasLubbers
CasLubbers merged commit 56d92bd into main Aug 25, 2026
9 checks passed
@CasLubbers
CasLubbers deleted the APL-1966 branch August 25, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants