In the Google Source Repositories docs, it asks you to use git config credential.helper gcloud.sh
to allow Git to authenticate
Recently, that's prevented me from using osxkeychain auth with GitHub - after adding that command, I get this error message when I attempt to pull from GitHub (on a repo whose only remotes are GitHub remotes):
git pull
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/[].git/'
Note that it doesn't even ask for my username & password again; it immediately refuses to connect
If I remove the gcloud credential.helper from git config, I can re-authenticate with GitHub (though need to type my username & password in again)
I'm using git version 2.15.1
and gcloud
:
Google Cloud SDK 183.0.0
alpha 2017.09.15
beta 2017.09.15
bq 2.0.27
container-builder-local
core 2017.12.08
datalab 20171003
gcloud
gsutil 4.28
kubectl
The problem here is that the instructions overwrite a possible existing credential helper. To restrict the credential helper to only apply to Google Source Repositories run:
git config credential.'https://source.developers.google.com'.helper gcloud.sh
or change in your .git/config
[credential]
helper = gcloud.sh
to
[credential "https://source.developers.google.com"]
helper = gcloud.sh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With