#mac-cli-key
1 messages · Page 1 of 1 (latest)
Hello! Let me dig around for a few minutes...
To double check - you don't have a STRIPE_API_KEY environment variable set, do you?
I do
And what is the format of that key? is it also sk_test_xxx?
In this container I'm both running stripe listen (works great) and hoping to run stripe trigger
It is sk_test_xxx, same key as is in the config file
Hmmm... if you do stripe config --list do you see any keys that are not three parts?
Nope, there is only test_mode_api_key
If I run stripe login and stripe config locally on my laptop for example I see 4 3 part keys, 2 rk's and 2 pk's
Very strange... do you also get errors if you try this stripe trigger --api-key sk_test_xxx customer.created
Same error 😦 Tried that with a rk from my dashboard too
What version of the CLI are you using? And when you ran stripe login again did you also do a stripe logout?
Ok I think I may have figured out the issue but its still a bit confusing to me. I actually have STRIPE_API_KEY set to reference a secret that I publish via a script (the details of this aren't relevant) and if I manually set STRIPE_API_KEY to my sk_test_xxx everything works!
But this is kind of strange behavior regardless because it makes it seem like the --api-key param is not working as intended
Does STRIPE_API_KEY take precedence?
Ah that's definitely it - STRIPE_API_KEY does take precedence over any other key you may set (see https://github.com/stripe/stripe-cli/wiki/Using-Stripe-API-Keys)
Ah missed that, I'll have to work around that with my docker config. Thank you!
👍