Home > Net >  firebase functions:secrets:set is not a Firebase command
firebase functions:secrets:set is not a Firebase command

Time:06-30

I am using cloud functions and would like to use Secret Manager to protect api keys for some services. Following the official documentation here , I tried using the command:

firebase functions:secrets:set STRIPE_TEST

but I received the following error:

Error: functions:secrets:set is not a Firebase command. Did you mean functions:config:set?

I want use secrets, not config that is not recommended

CodePudding user response:

I was having the same problem on firebase-tools version 10.1.2. There's currently a newer version 11.1.0 available but I was having trouble upgrading or even uninstalling:

$ firebase --version
10.1.2
$ npm i -g firebase-tools
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
...
$ firebase --version
10.1.2
$ npm uninstall --location=global firebase-tools
up to date, audited 1 package in 52ms
$ firebase --version
10.1.2

I figured out I could successfully uninstall firebase-tools with curl -sL firebase.tools | uninstall=true bash then I reinstalled it with npm i --location=global firebase-tools

That finally upgraded firebase --version to 11.1.0 which fixed firebase functions:secrets:set SECRET_NAME for me.

  • Related