Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to authenticate, have you run firebase login" with gcp_sa_key #5

Open
nvzoll opened this issue Jun 7, 2024 · 2 comments
Open

Comments

@nvzoll
Copy link

nvzoll commented Jun 7, 2024

Github action sample

- uses: w9jds/setup-firebase@main
  with:
    gcp_sa_key: ${{ secrets.GCP_SA_KEY_BASE64_DEV }}
    project_id: "develop"
  env:
    GOOGLE_APPLICATION_CREDENTIALS: "/opt/gcp_key.json"

Error from workflow run

2024-06-07T15:42:32.7047141Z ##[endgroup]
2024-06-07T15:42:32.7049493Z ##[group]Firebase Authentication
2024-06-07T15:42:32.7053270Z Storing service account key into /opt/gcp_key.json
2024-06-07T15:42:32.7067765Z ##[endgroup]
2024-06-07T15:42:32.7076942Z ##[group]Setup Project
2024-06-07T15:42:32.7102774Z [command]/usr/local/bin/firebase use --add develop

Error: Failed to authenticate, have you run firebase login?  
Error: {}
@orestesgaolin
Copy link

Did you manage to solve it?

@andrea689
Copy link

I solve without this action, simple:

      - name: Inizialize Node for Firebase SDK
        uses: actions/setup-node@v4
      - name: Inizialize Firebase SDK and execute commands
        run: |
          npm install -g firebase-tools
          echo "$CREDENTIAL_FILE_CONTENT" > "${{ github.workspace }}/gcp_key.json"
          firebase use --add [PROJECT_ID]
          firebase [YOUR_COMMAND]
        env:
          CREDENTIAL_FILE_CONTENT: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
          GOOGLE_APPLICATION_CREDENTIALS: "${{ github.workspace }}/gcp_key.json"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants