GoogleCloudPlatform / terraform-example-foundation-app

https://registry.terraform.io/modules/GoogleCloudPlatform/terraform-example-foundation-app/google
Apache License 2.0
33 stars 36 forks source link

Create a troubleshooting to step 6 and add authorization git problem #85

Closed vfigueiredo-cit closed 1 year ago

vfigueiredo-cit commented 3 years ago

Expected Behavior

Get authorization to access git repositories from bastion.

Actual Behavior

When using your personal account to access git repositories on bastion, it is not authorized. Error:

fatal: unable to access 'https://source.developers.google.com/p/prj-bu1-c-app-cicd-a72f/r/root-config-repo/': The requested URL returned error: 400
ERROR: (gcloud.source.repos.clone) Command '[u'git', u'clone', u'https://source.developers.google.com/p/prj-bu1-c-app-cicd-a72f/r/root-config-repo', u'/home/ext_vfigueiredo_ciandt_com/bank-of-anthos-repos/root-config-repo']' returned non-zero exit status 128

Steps to Reproduce the Problem

  1. Deploy foundation-app up to step 6-anthos-install
  2. On bastion, try to access(clone, push, etc) a git repository

Sugestion

To authorize it, is necessary to have an accredited service account in addition to the validation token, which expires in around 30 minutes and it is necessary to generate a new one.

To list Credentialed Accounts:

gcloud auth list

To generate the token:

gcloud auth print-access-token

Use the credentials obtained when access git repositories.

Specifications

rutalreja-deloitte commented 2 years ago

When using your personal account to access git repositories on bastion, it is not authorized.

  • The bastion sa has permission to access the repo, if you want your personal account to have access you will need to manually do that. It is assumed the user will use the default auth (bastion-sa) to perform actions on the bastion VM.
github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days