Skip to content

"git clone" yields error "fatal: --local can only be used inside a git repository" #1554

Description

@jazzdelightsme

Using git.exe 2.44.0.1, a very simple git clone call:

git clone --quiet --depth 1 $Source $cloneDest

yielded an unexpected error:

fatal: --local can only be used inside a git repository

The clone apparently succeeded (we got the files on disk), but the error looks very concerning ("fatal"!).

Downgrading to git 2.43 makes the error go away.

Derrick Stolee helped us isolate this to GCM--attached is a trace (using GIT_TRACE2_PERF=1) that he captured for us. He hypothesized:

It's possible that there was a change in GCM but also it could be a change in upstream Git that changed the timing of these GCM calls that think they can update the credentials.

Also, the --quiet, --depth 1, and $cloneDest parts of your command are not necessary to reproduce this problem.

trace-results.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions