Skip to content

Git-based tests inherit commit signing and fail when signing keys require a passphrase #2729

Description

@Widthdom

Summary

Several tests that create temporary Git repositories run plain git commit. On machines with global commit.gpgsign or SSH commit signing enabled, those fixture commits can prompt for the user's signing key passphrase and fail non-interactively.

Observed

While validating an unrelated backfill-fold change, dotnet test CodeIndex.sln produced many failures with:

error: Enter passphrase for "/Users/widthdom/.ssh/id_ed25519_signing": Load key ... incorrect passphrase supplied to decrypt private key?
fatal: failed to write commit object

Affected examples include GitHelperTests.* and git-backed IndexCommandRunnerTests.* that create fixture commits.

Expected

Test-created repositories should disable commit signing locally, or invoke Git with config that prevents global signing settings from affecting fixture commits.

Scope

This is not part of the current issue-fix implementation; it is a validation blocker discovered during the work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions