clickhouse-backup icon indicating copy to clipboard operation
clickhouse-backup copied to clipboard

allow to GCP JSON access credentials Base64 encoded

Open navi86 opened this issue 3 years ago • 3 comments

Hello, I am trying to create backup to remote google storage bucket. My config is

  - name: REMOTE_STORAGE
     value: "gcs"
  - name: GCS_BUCKET
     value: "bucket-name"
  - name: GCS_PATH
     value: "clickhouse"
  - name: GCS_DEBUG
     value: "true"
  - name: GCS_CREDENTIALS_JSON
     value: "base64 encoded string that contains credentials json data"

however, I am getting error error can\'t connect to GCS: googleHTTPTransport.NewClient error: invalid character \'e\' looking for beginning of value I believe that I passing wrong values in "GCS_CREDENTIALS_JSON". How can I fix it ?

navi86 avatar Aug 17 '22 11:08 navi86

i propose to use

  - name: GCS_CREDENTIALS_JSON
    value: |
       JSON without base64 encoding

look to https://github.com/AlexAkulov/clickhouse-backup/search?q=QA_GCS_CRED_JSON for details

Slach avatar Aug 21 '22 11:08 Slach

@navi86 please refer to this article https://mitchum.blog/how-to-store-json-in-an-environment-variable/ for how to pass json content as base64 encoded string

datavisorzhizhu avatar Aug 23 '22 01:08 datavisorzhizhu

@datavisorzhizhu it's not support encoded string

navi86 avatar Aug 23 '22 08:08 navi86