Skip to content

Fix calamari using global git credentials instead of those which are provided#1845

Merged
scme0 merged 3 commits intomainfrom
scme/md-1672/calamari-ignores-provided-git-credentials-when-pushing
Mar 31, 2026
Merged

Fix calamari using global git credentials instead of those which are provided#1845
scme0 merged 3 commits intomainfrom
scme/md-1672/calamari-ignores-provided-git-credentials-when-pushing

Conversation

@scme0
Copy link
Copy Markdown
Collaborator

@scme0 scme0 commented Mar 25, 2026

LibGit2Sharp automatically uses global git credentials by default which means Calamari uses build in credentials instead of the credentials provided.

MD-1672

@scme0 scme0 force-pushed the scme/MD-1529/no-op-argocd-updates branch from c70b672 to 44b53bb Compare March 26, 2026 17:04
@scme0 scme0 force-pushed the scme/md-1672/calamari-ignores-provided-git-credentials-when-pushing branch from 556f1e3 to 1fe5c68 Compare March 26, 2026 17:04
@scme0 scme0 force-pushed the scme/MD-1529/no-op-argocd-updates branch from 44b53bb to fce0ce4 Compare March 26, 2026 17:28
@scme0 scme0 force-pushed the scme/md-1672/calamari-ignores-provided-git-credentials-when-pushing branch 2 times, most recently from a1ca341 to e2cb4a9 Compare March 26, 2026 18:08
@scme0 scme0 force-pushed the scme/MD-1529/no-op-argocd-updates branch from bf2e2c1 to 5f180f9 Compare March 26, 2026 18:50
@scme0 scme0 force-pushed the scme/md-1672/calamari-ignores-provided-git-credentials-when-pushing branch from e2cb4a9 to d6a7a98 Compare March 26, 2026 18:50
@scme0 scme0 force-pushed the scme/MD-1529/no-op-argocd-updates branch from 5f180f9 to 6da3325 Compare March 27, 2026 09:04
@scme0 scme0 force-pushed the scme/md-1672/calamari-ignores-provided-git-credentials-when-pushing branch 3 times, most recently from 1ea9948 to 554d734 Compare March 27, 2026 10:28
@scme0 scme0 force-pushed the scme/MD-1529/no-op-argocd-updates branch from 1ee42ca to 1908ed0 Compare March 27, 2026 11:12
@scme0 scme0 force-pushed the scme/md-1672/calamari-ignores-provided-git-credentials-when-pushing branch 3 times, most recently from 00b4362 to 83c8fff Compare March 27, 2026 14:32
Base automatically changed from scme/MD-1529/no-op-argocd-updates to main March 27, 2026 18:30
@scme0 scme0 force-pushed the scme/md-1672/calamari-ignores-provided-git-credentials-when-pushing branch 2 times, most recently from 6adb4f4 to 14b0723 Compare March 30, 2026 07:59
// explicit credentials. Clear the search paths for all global config levels so libgit2
// cannot load ~/.gitconfig or /etc/gitconfig and pick up a credential helper (e.g.
// osxkeychain) that would silently override or bypass the credentials we provide.
GlobalSettings.SetConfigSearchPaths(ConfigurationLevel.Global, Array.Empty<string>());
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.

Suggested change
GlobalSettings.SetConfigSearchPaths(ConfigurationLevel.Global, Array.Empty<string>());
GlobalSettings.SetConfigSearchPaths(ConfigurationLevel.Global, []);

Can we use the empty collection syntax?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good call, I believe we can.

scme0 and others added 3 commits March 31, 2026 09:40
…o-op test

After rebase conflict resolution, some tests incorrectly used UpdatedSourceDetail
instead of TrackedSourceDetail. Also applied raw string literal improvements to
the newly added no-op source test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@scme0 scme0 force-pushed the scme/md-1672/calamari-ignores-provided-git-credentials-when-pushing branch from 14b0723 to 07e235a Compare March 31, 2026 07:40
@scme0 scme0 marked this pull request as ready for review March 31, 2026 09:14
@scme0 scme0 merged commit e0adb43 into main Mar 31, 2026
33 checks passed
@scme0 scme0 deleted the scme/md-1672/calamari-ignores-provided-git-credentials-when-pushing branch March 31, 2026 09:14
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.

2 participants