GCP service account authentication not working with Tekton CI/CD #5013
Unanswered
anandjaisy
asked this question in
Q&A
Replies: 1 comment 3 replies
-
for GCP auth to work you might have to manually use gcloud auth activate-service-account: https://cloud.google.com/sdk/gcloud/reference/auth/activate-service-account with the Service Account JSON Alternatively try using GCP Workload Identity so that you do not have to pass around Service Account JSONs: https://wlyn.ch/posts/gcp-tekton-workload-identity/ (You should also definitely make sure the Service account key you pasted above is disabled since the private key is out in public) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have set up the pipeline that does the below work
gradle.build
pipeline-run.yaml
During the build process, I get an exception as 403 from server: Forbidden
2022-06-20T11:43:46.901622299Z Required by:
2022-06-20T11:43:46.905433716Z project :discount-api
2022-06-20T11:43:46.905908549Z project :discount-api > project :core
2022-06-20T11:43:46.907587216Z project :discount-api > project :infrastructure
2022-06-20T11:43:46.910430882Z > Could not resolve fete.bird:common:1.0.1.
2022-06-20T11:43:46.916549841Z > Could not get resource 'https://australia-southeast2-maven.pkg.dev/fetebird-350310/common/fete/bird/common/1.0.1/common-1.0.1.pom'.
2022-06-20T11:43:46.919566716Z > Could not GET 'https://australia-southeast2-maven.pkg.dev/fetebird-350310/common/fete/bird/common/1.0.1/common-1.0.1.pom'. Received status code 403 from server: Forbidden
2022-06-20T11:43:46.920126507Z
2022-06-20T11:43:46.921247424Z * Try:
2022-06-20T11:43:46.992466299Z > Run with --stacktrace option to get the stack trace.
2022-06-20T11:43:46.994160424Z > Run with --info or --debug option to get more log output.
2022-06-20T11:43:46.994594549Z > Run with --scan to get full insights.
2022-06-20T11:43:46.994759174Z
2022-06-20T11:43:46.995529757Z * Get more help at https://help.gradle.org
2022-06-20T11:43:46.995904924Z
2022-06-20T11:43:46.996231841Z BUILD FAILED in 4m 59s
Step failed
In the
pipeline-run.yaml
, I have a reference ofserviceAccountName: fetebird-service-account
which hold the below infoHere the two secrets are referred, the git ssh is working fine, however, GCP authentication is not working.
Beta Was this translation helpful? Give feedback.
All reactions