how to authenticate correctly to Google Cloud Source Repositoriess with sdk

2.7k views Asked by At

I've followed the steps provided by Google Cloud Source Repositories in source.cloud.google.com

  1. gcloud init && git config --global credential.https://source.developers.google.com.helper gcloud.cmd
  2. git remote add google https://source.developers.google.com/p/[Project-id]/path
  3. git push --all google

But I get the error: invalid authentication credentials

I'ts frustrating following those steps and not able to accomplish the task

enter image description here

2

There are 2 answers

1
Alioua On BEST ANSWER

I did follow these step for adding repositories, and it work fine.

In some cases, you might not have access to the Cloud SDK. For example, you might work on a build server that does not have access to these tools. In these situations, you can manually generate static credentials.

Navigate to the repository page.

Locate the repository and click Clone.

Change the preferred authentication method to manually generated credentials.

Follow the instructions to use the generated credentials.

0
Ashish Kumar On

Do the following steps below- It worked for me

enter image description here

You will be getting new generated authentication credentials. You need to copy that and paste in your cmd. It will work perfectly then.