Closed xerosanyam closed 4 years ago
Yeah I'm actually having the same issue here. I tried encoding in different ways to no avail!
converting to base64 didn't work for you? how did you convert?
@matteobart key must be converted to base64. You can do it with the this command: base64 ~/<account_id>.json
Yes I did use this command: base64 ~/<account_id>.json > encodedFile
then placed the path to the encoded file in the secrets under GOOGLE_APPLICATION_CREDENTIALS
And then I get the following error:
Writing this out I may have found the issue... Should the secret's value be the encoded value after running base64 ~/<account_id>.json
rather than have it be the path (to the file with the encoded value)?
@matteobart just copy the output of base64 ~/<account_id>.json
to the APPLICATION_CREDENTAILS
secret.
As I understand placed the path to encodedFile
in GOOGLE_APPLICATION_CREDENTIALS
.
It will not work in this way.
In secrets you can keep some sensitive data. Usually, it's some credentials. You can put the path to some of your encodedFile
in secret. It will mean, that action must go to this url and fetch the credentials from it. But this action cannot load credentials from the external source (s3 etc).
Ok, credentials must be encoded with base64. If you want to change it, you are welcomed to make a PR with this change. But do not forget to support a base64 format too.
i had to move my downloaded json file to my root user folder. then the base64 command worked.
Got this error when added key.json to GitHub secret directly. The solution is to convert the key to base64, as the README of this repo says.
If possible, can we improve this error message? Thanks for the hard work! :)