Reputation: 516
I have just signed up to try google cloud repository and am trying the getting started list and failed on the
git remote add google https://source.developers.google.com/p/*name-xxxxxx*/r/default
git push google master
fatal: remote error: Forbidden
I can't tell if they think I don't have permission, I am the owner of the organization project
I created a repository in the Source Tools Console
I then attempt to follow their direction to create a local repository and it fails:
gcloud source repos clone source --project=project-xxxxxx
Cloning into 'xxx\\source'...
ERROR: (gcloud.auth.git-helper) Invalid input line format: [path=].
fatal: remote error:
Invalid authentication credentials.
Please generate a new identifier:
https://source.developers.google.com/auth/start?scopes=https://www.googleapis.com/auth/cloud-platform
ERROR: (gcloud.source.repos.clone) Command '['git', 'clone', 'https://source.developers.google.com/p/project-xxxxxx/r/source', 'xxx\\source', '--config', 'credential.helper=!gcloud.cmd auth git-helper [email protected] --ignore-unknown $@']' returned non-zero exit status 128
Upvotes: 6
Views: 7888
Reputation: 11
Mistakenly I've tried to push to a repo that wasn't 100% set up correctly.
git remote -v
Will show you remote names along w/ full URL path origin.
Upvotes: 1
Reputation: 145
just run the following command in the terminal but you have to run it as administrator first
git config --system --unset credential.helper
Upvotes: 0
Reputation: 114
After running @gtiwari333 command, opened CMD with admin permissions and was able to run the gcloud source repos clone default --project=myprojectsname
command
Upvotes: 0
Reputation: 25156
It looks there was a conflict on credential manager between gcloud and existing git setup.
I ran the following to unset the credential manager and it allowed me to clone the gcloud repo.
> git config --system --unset credential.helper
Upvotes: 3
Reputation: 11555
I had to create a repository on Google Cloud Platform -> Development -> Repositories
Following GCloud code lab, I had to create default
repository there.
Upvotes: 1
Reputation: 136
The exact format of the Cloud Source Repositories URL is https://source.developers.google.com/p/${project_id}/r/${repo_name}
. It appears that you are trying to use your project number instead of your project id.
To find your project ID from your project number, you can run:
gcloud projects list --filter PROJECT_NUMBER=${project_number}
Also make sure that you are authenticating with the correct account. You can see the active account gcloud is using by running:
gcloud auth list
If you are still having problems cloning your repository, I would try making sure your version of gcloud is up to date (e.g. gcloud components update
).
Upvotes: 0