Skip to content

PAT token in .npmrc #241

Answered by meganindya
kirtanchandak asked this question in Q&A
Jan 9, 2023 · 3 comments · 6 replies
Discussion options

You must be logged in to vote

I can see

npm ERR! 401 Unauthorized - GET https: //npm.pkg.github.com/dow.... - authentication token not provided

So, it seems you don't have your PAT in the ~/.npmrc file in your local machine or inside the docker container.

I tried to replicate it.

In the first attempt, I removed the PAT from my local machine's ~/.npmrc and as expected, it throws a 401 error.

In the second attempt, I added the PAT in my docker container's ~/.npmrc and it succeeds.

I found that you don't necessarily need to add your PAT in the docker container's ~/.npmrc if you have that in your local machine's ~/.npmrc. However, if it doesn't work for you, add it after opening your docker container.

echo "//npm.pkg.git…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@Tushar98644
Comment options

@likitarai1
Comment options

@Tushar98644
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Anurag-Band
Comment options

@meganindya
Comment options

@Anurag-Band
Comment options

Answer selected by meganindya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants