mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #1412] Setting NODE_AUTH_TOKEN does not authenticate with npm #743
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#743
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @haseebnaseem on GitHub (Oct 26, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1412
Bug report info
Command used with act
Describe issue
The same workflow successfully installs dependencies, while with act it does not.
Setting the same variable in
.npmrcworks.run: echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc && npm ci --ignore-scripts --no-audit --no-progress --prefer-offlineLink to GitHub repository
No response
Workflow content
Relevant log output
Additional information
No response
@github-actions[bot] commented on GitHub (Nov 27, 2022):
Issue is stale and will be closed in 14 days unless there is new activity
@20k-ultra commented on GitHub (Nov 30, 2022):
If I do
act -v -s GITHUB_TOKENwith the following workflow I can confirm that the secret is being passed because the char count is equal to the number of chars I'm entering when prompted.It seems like an issue with setup-node considering you said this only works when you, yourself echo the variable to
.npmrc.I would try to cat
.npmrcafter setup-node runs, and if you see//npm.pkg.github.com/:_authToken=****than you know the asterisks are your secret. If there aren't any, you know the secret was not set in.npmrc.I'd also try to run your action on Github's runners. If it works there than we can narrow it down to act.
@ruben-chainalysis commented on GitHub (Dec 1, 2022):
I hit a similar issue using
setup-nodeand it turned out that the format of the variableNODE_AUTH_TOKENwas just the token. TheauthTokenin the.npmrcfile is sometimes (for some private registries at least this is always the case) a base64 encoded string with both your username and token, you might be hitting that problem if the file works but not the input for the job.@github-actions[bot] commented on GitHub (Jan 1, 2023):
Issue is stale and will be closed in 14 days unless there is new activity