When I try to git push
to Google cloud repository, I get the above message.
It then asks me to enter my credentials. After that I get the following error:
Valid choices are [auth, components, compute, config, container, deployment-manager, dns, docker, feedback, help, info, init, meta, preview, projects, source, sql, topic, version]. fatal: Authentication failed for 'https://source.developers.google.com/p/projectname/'
Is there anything am missing?
As git config --list
shows in your setup, git credential helper points to
credential.helper=/opt/google-cloud-sdk/bin/gcloud
This appears to be incorrect. The helper should not include absolute path. You can reset it to correct value by running
$ git config credential.helper gcloud.sh
For the above to work gcloud
MUST be in your PATH environment variable, as otherwise git will not be able to find git-credential-gcloud.sh
. Make sure
$ which git-credential-gcloud.sh
returns path where it is located. If it does not you can run to set path
$ source /opt/google-cloud-sdk/path.bash.inc