Apify Discord Mirror

Updated 3 months ago

Apify Secret Nonexistent Flag Error

At a glance

The community member is trying to add a secret using the Apify CLI but is encountering an error saying "Error: Nonexistent flag". They are using the command apify secrets:add aPrivateKey '-----BEGIN PRIVATE KEY-----_base64content_-----END PRIVATE KEY-----'. Another community member suggests that the correct syntax is apify secrets add without the colon, based on the documentation. However, the original community member tried this and still received the same error. There is no explicitly marked answer in the comments.

Useful resources
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