Cannot use firebase tools with gitpod
In order to use firebase from Google, it uses some cli tools. You need to authenticate for many things, which brings us a new browser window and uses oath (i'm assuming) to authenticate. It never seems to make it back to gitpod instance
Tools installed using npm i -g firebase-tools
To Reproduce
Set up a new repo
in terminal run npm i -g firebase-tools
set up a project in firebase.google.com
run firebase init in gitpod to set up and tell it to use project created above
run firebase login
this tells us Visit this URL on any device to log in
click the link and it opens browser window
authorise permission in this window
Expected behavior
the gitpod terminal should tell you that you now have permission, but what actually happens is nothing
I use firebase every day inside of gitpod.
You just have to ask for the non-interactive login like this:
$ firebase login --no-localhost
It will give you the URL of the link you need to open instead of attempting to open the window.
That works great, thanks for the prompt answer! Is there a way to get firebase-tools loaded automatically to gitpod instance without running npm i -g firebase-tools every time?
Is there a way to get firebase-tools loaded automatically to gitpod instance without running npm i -g firebase-tools every time?
@hotelbuddy-online Yes, if you add something like this to your repository's .gitpod.yml file:
tasks:
- before: npm i -g firebase-tools
then every new workspace you create for that repository will have the firebase-tools already pre-installed.
awesome! Thanks.
Most helpful comment
I use firebase every day inside of gitpod.
You just have to ask for the non-interactive login like this:
It will give you the URL of the link you need to open instead of attempting to open the window.