$ echo $SERVICE_ACCOUNT_DEV > ${HOME}/gcloud-service-key.json
$ gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json
ERROR: (gcloud.auth.activate-service-account) Could not read json file /root/gcloud-service-key.json: Expecting value: line 2 column 1 (char 1).
Run Code Online (Sandbox Code Playgroud)
我检查了存储在 gitlab ci/cd 变量中的 SERVICE_ACCOUNT_DEV json 文件,但没有问题。