You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a slightly modified (from default generated) workflow that I have:
# This file was auto-generated by the Firebase CLI# https://github.com/firebase/firebase-toolsname: Deploy to Firebase Hosting on mergeon:
push:
branches:
- developjobs:
build_and_deploy:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4
- name: Set up Node.jsuses: actions/setup-node@v4with:
node-version: 18registry-url: "https://npm.pkg.github.com"scope: "@org-name"always-auth: true
- run: npm ci && npm run buildenv:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: FirebaseExtended/action-hosting-deploy@v0with:
repoToken: ${{ secrets.GITHUB_TOKEN }}firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FIREBASE_SANDBOX_425310 }}channelId: liveprojectId: firebase-sandbox-425310env:
FIREBASE_CLI_EXPERIMENTS: webframeworks,pintagsNODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Error message
Firebase deployment fails with nnpm ERR! 401 Unauthorized - GET https://npm.pkg.github.com/download/@org-name/app-components-frontend/0.18.33/233b5141a9f47e0a5863ebb4cd714b82c4c87100 - authentication token not provided
Expected behavior
While npm ci works fine because it uses an .npmrc file generated by the setup-node action, firebase hosting deploy action doesn't seem to be picking that up.
I've tried to find something in the docs of either firebase tools or the action, but didn't find anything that would help me resolve this.
Actual behavior
Auth to npm registry fails and hence deployment fails
The text was updated successfully, but these errors were encountered:
Found firebase/firebase-tools#5936 , could be related? I guess this needs to be fixed in firebase-tools
Still, maybe there's something that the action can do to help here? Like, temporary copy an .npmrc file with an embedded token? (I think I'll try to do this "manually" now and see how that goes)
Hi @jasonmit ,
As far as I understood, this is a firebase(-tooling) issue, not an issue with this action (but I kept this one open just to have the maintainers confirm that; or maybe add some support from the action side, if possible)
The only current workaround I know of is to hardcode the token in the .npmrc file. Regular firebase hosting doesn't seem to support environment variables (The new apphosting seems to , but we're not using that)
Action config
This is a slightly modified (from default generated) workflow that I have:
Error message
Firebase deployment fails with
nnpm ERR! 401 Unauthorized - GET https://npm.pkg.github.com/download/@org-name/app-components-frontend/0.18.33/233b5141a9f47e0a5863ebb4cd714b82c4c87100 - authentication token not provided
Expected behavior
While
npm ci
works fine because it uses an.npmrc
file generated by thesetup-node
action, firebase hosting deploy action doesn't seem to be picking that up.I've tried to find something in the docs of either firebase tools or the action, but didn't find anything that would help me resolve this.
Actual behavior
Auth to npm registry fails and hence deployment fails
The text was updated successfully, but these errors were encountered: