So im trying to write a secret to a json with this
echo "$GOOGLE_TOKEN" > /tmp/gcloud.json
And it writes correctly if i cat the file. But when i try to do an gcloud auth I get this error.
ERROR: (gcloud.beta.auth.activate-service-account) Could not read json file /tmp/gcloud.json: Invalid control character at: line 5 column 46 (char 171)
And im positive its not the json because i was able to authenticate with the same command on my machine, so it seems the error is the echo.