Search code examples
gitgoogle-cloud-platformgoogle-cloud-repository

how to authenticate correctly to Google Cloud Source Repositoriess with sdk


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


Solution

  • 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.