Reputation: 4461
SITUATION:
I am following this tutorial:
https://cloud.google.com/nodejs/tutorials/bookshelf-on-compute-engine
When I get here:
CODE:
git commit -am "Updating configuration"
git config credential.helper gcloud.sh
git remote add cloud https://source.developers.google.com/p/[YOUR_PROJECT_ID]/
git push cloud
ERROR:
I get the following error:
fatal: remote error: Forbidden
QUESTION:
How do I fix this ?
P.S.: I did do: gcloud auth application-default login
Upvotes: 0
Views: 1475
Reputation: 2593
When adding the remote, make sure to use the full URL for your repo, as listed in your set of repositories at https://console.cloud.google.com/code/develop/repo?project=[PROJECT]
For example:
git commit -am "Updating configuration"
git config credential.helper gcloud.sh
git remote add cloud https://source.developers.google.com/p/[PROJECT]/r/[REPO]
git push cloud
Upvotes: 4
Reputation: 3527
gcloud auth application-default login
command acquires user credentials to use for Application Default Credentials. These credentials are strictly used by Google client libraries in your own application. They are not used for any API calls made by the gcloud CLI or git-credential-gcloud.sh
script.
Use gcloud auth login
command instead.
Upvotes: 0