`SystemError: Credentials could not be found.` without explanation for how to add credentials
jakelevi1996 opened this issue · 2 comments
I tried running pypinfo
for my package (as per these instructions) but I got an error SystemError: Credentials could not be found.
. Running pypinfo -h
shows there is an optional argument -a, --auth TEXT Path to Google credentials JSON file.
, but does not explain what format the credentials should be in, and I can't find any explanation in the usage examples. How do I authenticate?
Run pypinfo -v
to see if/where you have a credentials file set.
Installation instructions are at https://github.com/ofek/pypinfo#installation, click the toggle to expand.
The format is JSON, looks something like this:
{
"type": "service_account",
"project_id": "<snip>",
"private_key_id": "<snip>",
"private_key": "-----BEGIN PRIVATE KEY-----\n<snip>\n-----END PRIVATE KEY-----\n",
"client_email": "<snip>@<snip>.iam.gserviceaccount.com",
"client_id": "<snip>",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/<snip>.iam.gserviceaccount.com"
}
Thanks, makes sense, I didn't read that section of the README because I assumed it was about how to pip install/build the module from source, rather than how to add credentials. Maybe makes sense to rename that section in the README from "Installation" to "Authentication" or similar? Just a thought,