Skip to content

Conversation

@Fer0x
Copy link
Contributor

@Fer0x Fer0x commented Sep 26, 2018

Summary

When registry returns 401 status code it should be considered as error.
401 means that credentials are invalid, but yarn says that everything is fine.

#6413 - this PR didn't change handling of 401 errors.

Test plan

yarn publish with expired/corrupted token in .npmrc.

@buildsize
Copy link

buildsize bot commented Sep 26, 2018

File name Previous Size New Size Change
yarn-[version].js [new file] 4.2 MB
yarn-[version].noarch.rpm [new file] 1.07 MB
yarn-legacy-[version].js [new file] 4.37 MB
yarn-v[version].tar.gz [new file] 1.07 MB
yarn_[version]all.deb [new file] 791.07 KB
Copy link
Member

@arcanis arcanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the 401 handling was added as part of #1558. Can you check that the use case described there (cloning from a private bitbucket repository) still works, before we merge this?

@Fer0x
Copy link
Contributor Author

Fer0x commented Sep 28, 2018

@arcanis ok, I'll look into it ASAP.

@Fer0x
Copy link
Contributor Author

Fer0x commented Oct 10, 2018

@arcanis

Command yarn-local add bitbucket:Lucus/test-npm-lib --verbose (private repo) works good for me.

@Fer0x
Copy link
Contributor Author

Fer0x commented Nov 8, 2018

@arcanis is there any reasons to not merge this PR? :)

@arcanis
Copy link
Member

arcanis commented Nov 8, 2018

My workload, mostly 😅 will try to get a look today

@timemachine3030
Copy link

+1 for this to be resolved. Running yarn with a bad token in ~/.npmrc (or other location parsed by yarn) returns an inaccurate response:

$ yarn yarn install v1.16.0 info No lockfile found. [1/4] 🔍 Resolving packages... error Couldn't find package "typescript" on the "npm" registry. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 
@jKatt
Copy link

jKatt commented Dec 9, 2019

I lately ran into this issue with an expired token and yarn silently ignoring it when publishing.

Are there any plans on merging this PR in the near future?

@Fer0x
Copy link
Contributor Author

Fer0x commented Jan 21, 2020

@arcanis Hey, what about merging this? ;)

@Fer0x Fer0x closed this Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants