How can I get firebase deploy --email or --token parameters to work?

jhlosin picture jhlosin · Dec 10, 2015 · Viewed 11.7k times · Source

I'm having trouble deploying travis CI with firebase using these firebase commands:

firebase deploy --email ${FIREBASE_USERNAME} --password ${FIREBASE_PASSWORD}
firebase deploy --token ${FIREBASE_TOKEN}

It does not like --email option and it does seem that it takes --token but does not work with my firebase auth token I can get from my firebase app. What am I doing wrong?

Answer

David East picture David East · Dec 10, 2015

The email option was removed in the 2.0 release of the CLI.

Use firebase login:ci to generate a token.

  1. On a machine with a browser, install the Firebase CLI.
  2. Run firebase login:ci to log in and print out a new access token (the current CLI session will not be affected).
  3. Store the output token in a secure but accessible way in your CI system.