CA
Crawlee & Apify8mo ago
unwilling-turquoise

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.
4 Replies
Hall
Hall8mo ago
View post on community site
This post has been pushed to the community knowledgebase. Any replies in this thread will be synced to the community site.
Apify Community
Marco
Marco8mo ago
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
Command reference | CLI | Apify Documentation
This section contains printouts of apify help for all commands.
unwilling-turquoise
unwilling-turquoiseOP8mo ago
I thought so too, but it gives the same result.
apify secrets add dashedEnvVar '--my-env-var--'
› Error: Nonexistent flag: --my-env-var--
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
MEE6
MEE68mo ago
@exu005 just advanced to level 1! Thanks for your contributions! 🎉

Did you find this page helpful?