cherba
cherba

Reputation: 8980

On Windows git pull and clone for Google cloud repository pops credential manager dialog box

Pulling from an existing clone

git pull

or cloning Google cloud repository with gcloud

gcloud source repos clone default my_repo

produces the following dialog box: enter image description here

How do I configure git so that it uses gcloud credentials automatically?

Upvotes: 13

Views: 8050

Answers (2)

Brett Caswell
Brett Caswell

Reputation: 1504

In my case, I opened and modified 'C:\Program Files\Git\mingw64\etc\gitconfig':

[credential]
    helper = gcloud.cmd
    old = manager

so that I had some notion of retention with my git config modifications..

Upvotes: 4

cherba
cherba

Reputation: 8980

If you run

C:\> git config --list --system
credential.helper=manager

and get a setting for credential.helper like above, it will have precedence over gcloud installed credential helper.

You can unset it via (possibly as administrator)

C:\> git config --system --unset credential.helper

Now

C:\> gcloud source repos clone default my_repo

should work and

C:\> cd my_repo
C:\my_repo> git config --list

should display

credential.helper="gcloud.cmd"

Upvotes: 21

Related Questions