Firebase-tools: Deploying with --token flag fails in Travis-CI

Created on 13 Oct 2015  路  5Comments  路  Source: firebase/firebase-tools

Following the instructions in the README for v2, I've been unable to successfully deploy via Travis.

In my Travis repo settings I've set FIREBASE_TOKEN with the output from firebase prefs:token, and in my travis.yml I've replaced this:

after_success:
  firebase deploy --email ${FIREBASE_EMAIL} --password ${FIREBASE_PASSWORD}

with this:

after_success:
  firebase deploy --token "${FIREBASE_TOKEN}"

But the deploy fails with:

Error: Command requires authentication, please run firebase login

What am I missing?

Most helpful comment

When adding my token into the Travis repo settings page, I neglected to wrap the token in quotes. Deploy is working now, thanks.

All 5 comments

Where did you get the token for deploying? You can output a token from a logged in Firebase tools by running firebase prefs:token

Sorry, I see that you did. Did you log out on the other Firebase tools?

When adding my token into the Travis repo settings page, I neglected to wrap the token in quotes. Deploy is working now, thanks.

Thanks for posting the resolution. That | is pretty hidden in there!

@r-park You saved us a lot of headache with this comment. Thank you!

Was this page helpful?
0 / 5 - 0 ratings