Apify and Crawlee Official Forum

Updated 2 months ago

Apify Secret Nonexistent Flag Error

Hi there. I want to add a secret using the Apify CLI but got an error saying "Error: Nonexistent flag". Are there special characters that need to be escape? I'm using this command apify secrets:add aPrivateKey '-----BEGIN PRIVATE KEY-----_base64content_-----END PRIVATE KEY-----'. Thanks for the help.
M
e
A
3 comments
I have personally never used this command, but looking at the documentation it seems to me that the correct syntax is apify secrets add, without colon: https://docs.apify.com/cli/docs/reference#apify-secrets-add-name-value
I thought so too, but it gives the same result.
Plain Text
apify secrets add dashedEnvVar '--my-env-var--'
 β€Ί   Error: Nonexistent flag: --my-env-var--

I'm using apify-cli/0.20.11 darwin-arm64 node-v23.1.0
@exu005 just advanced to level 1! Thanks for your contributions! πŸŽ‰
Add a reply
Sign up and join the conversation on Discord