Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

ERROR: (gcloud.auth.activate-service-account) Could not read json file /tmp/key-file.json: Expecting

Michał Kochman November 17, 2021

Hi,

I'm trying to configurate autodeploys with bitbucket pipeline and google cloud.
I have base yaml:

 - pipe: atlassian/google-cloud-storage-deploy:1.0.1
variables:
KEY_FILE: $KEY_FILE
PROJECT: 'somexyz'
BUCKET: 'somexyz'
SOURCE: './test'

 And I have problem with access ;(
So I have cloud priv key

MIIEvgIBA...

 I generated base64 from it  base64 -w 0 < file

SUV2Z0lCQURBTkJna3F...

 

I set on bitbucket secured key KEY_FILE with base64 value and I get 


ERROR: (gcloud.auth.activate-service-account) Could not read json file /tmp/key-file.json: Expecting

Any idea why? 

1 answer

1 accepted

0 votes
Answer accepted
Michał Kochman November 19, 2021

I've found the answer :D
Ehh all generated key file should be converted to base64 and passed as secure bitbucket variable XD
Quite strange that when I created json structure only with private keys(key -> value) I didn't get info like no access or missing access data from gcloud but the same error as it was empty XD

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events