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

Nondeterministic problems with private packages authentication with valid token #88

Open
kamilkazmierczakMtab opened this issue Aug 18, 2022 · 1 comment

Comments

@kamilkazmierczakMtab
Copy link

I have weird issues with npm install that is called from size-limit-action
In 90% cases on first try I get
npm ERR! 401 Unauthorized - GET https://npm.pkg.github.com/download/..... - - unauthenticated: User cannot be authenticated with the token provided
It's always for private packages under same organization.
Token is 100% valid (It's not secrets.GITHUB_TOKEN because GITHUB_TOKEN can't access private packages) with all read and write access - even with token with absolutely all access issue occurs)

What is very surprising is that almost everytime on second try (re-run failed action) everything works fine.

I tried to live with it and almost everytime re-run failed action but sometimes I have bigger problems - e.g. I just updated my private package and of course it failed at first try but then on second attempt it failed after switching to main branch - so now I have no idea what to do to make it work.

I'm using latest version of size-limit-action (1.7.0) and I'm 100% sure that token is valid because I'm using it for npm install for many other workflows and everything works as expected so it must be problem with size-limit-action`

@kamilkazmierczakMtab
Copy link
Author

Also after update of some dependencies it will always fail after switching to main branch so I have to manually update packages in main branch and only after that size-limit will not fail with 401 after switching to main

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

1 participant