How to login to `firebase-tools` on headless remote server?

后端 未结 3 1472
伪装坚强ぢ
伪装坚强ぢ 2021-02-05 15:04

I am attempting to use firebase-tools on a remote Linux server via Putty. There is no desktop running on this server.

When I run firebase login

3条回答
  •  星月不相逢
    2021-02-05 15:45

    Procedure on how to setup Firebase for CI and headless servers is described here: https://github.com/firebase/firebase-tools#using-with-ci-systems

    The Firebase CLI requires a browser to complete authentication, but is fully compatible with CI and other headless environments.

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

    There are two ways to use this token when running Firebase commands:

    1. Store the token as the environment variable FIREBASE_TOKEN and it will be automatically used.
    2. Run all commands with --token flag in your CI system.

提交回复
热议问题