-
I have a nodejs workflow and of course I am trying to install dependencies. One of those dependencies is in another repository’s package repo. I have the workflow authenticating just fine, but the problem is that it doesn’t find the package. Am I mising something? The package is under joekaiser/test and the workflow is running at joekaiser/ci-test To be clear, I know the pacakge exists. The same project builds in AWS CodePipeline.
|
Beta Was this translation helpful? Give feedback.
Replies: 16 comments 1 reply
-
At the moment you’ll need a personal access token for that.
Related issue |
Beta Was this translation helpful? Give feedback.
-
This issue is still happening regardless whether one uses the GITHUB_TOKEN or the PERSONAL_ACCESS_TOKEN when the repository is Private. Steps to reproduce.
package.json
.npmrc
index.json
.npmrc
package.json
index.json
You will also notice that the link to the Assets download on the packages page is “NOT FOUND when you hover over it”
NOTE: this behaviour might not happen straight away in some cases, the NOT FOUND issue might start happening 30 to 45 minutes after the package has be published. |
Beta Was this translation helpful? Give feedback.
-
Your .npmrc is incorrect. It should look like this:
Also you should do this only on the CI, because when someone checkouts the repo, it won’t work obviously. I have a step in the CI for this:
|
Beta Was this translation helpful? Give feedback.
-
Did you manage to get this working? I am getting the eact same error? |
Beta Was this translation helpful? Give feedback.
-
@krystof-k The instructions I wrote above are mearnt to be sudo code and just a minimum guide on what someone needs to do to reproduce the issue, there are not mearnt to be a copy paste 100% accurate source code. You will have to properly write the variables and so on, but this not the issue here. To fully understand the problem, create a sample package that is private roughly as I outlined in the steps with your correct variable configs and you will end up with the issue I reported. It does not matter whether you do it through github actions or from your local. The problem still exists and needs to be addressed otherwise GPR is not useful if people cannot reliably host and consume PRIVATE packages. |
Beta Was this translation helpful? Give feedback.
-
Facing the same issue with a private repository, can’t install the package and the assets link to https://notfound.pkg.github.com/. I changed the visibility to public and I was able to install the package. |
Beta Was this translation helpful? Give feedback.
-
@wpitalloI am still having the problem, I contacted github support about it and took a week before some guy got back to me and told me that he escalated the issue and have not heard anything since then so I am just waiting for someone from there to respond either on this thread or in the support ticket. I just don’t get how something as critical as this issue slipped through their testing and quality assurance. At the very minimum, I would expect that if someone is providing a Package Registry, they ensure that it reliably satisfies both public and private use cases. |
Beta Was this translation helpful? Give feedback.
-
Hmm, this is weird. In our repos it works fine (using the PAT). But we’re using Yarn, may that be the reason? |
Beta Was this translation helpful? Give feedback.
-
Since this issue evolved from the original question (and solution), see the new dedicated issue to here: https://github.community/t5/GitHub-API-Development-and/Github-package-registry-Private-package-not-found/m-p/40062/ |
Beta Was this translation helpful? Give feedback.
-
Hi, I had the same problem trying to deploy a private npm package on Github. I solved it by changing the name in package.json “name”: “@myOrganizationName/MyRepoName”, Also in my npmrc: Hope that helps :slight_smile: |
Beta Was this translation helpful? Give feedback.
-
r-julien:
This works for me. Thanks. |
Beta Was this translation helpful? Give feedback.
-
For everyone getting a 404 response even though everything seems correct: CHECK YOUR REPOSITORY FIELD. I just spent 2 hours changing every line of my GitHub action and package.json and in the end, there was an outdated value in the repository field in the package.json. In my opinion the 404 error is really really not a helpful error message here. |
Beta Was this translation helpful? Give feedback.
-
Its the third quarter of 2121 and this issue still persists. SMH!! Any one of you remember how this was solved? I am having the EXACT same issue |
Beta Was this translation helpful? Give feedback.
-
As @ankri said, Make sure you generate a Personal Access Token with the appropriate scopes. |
Beta Was this translation helpful? Give feedback.
-
I checked every box while generating my PAT just to be sure. But still 🙁 |
Beta Was this translation helpful? Give feedback.
-
This (@joekaiser’s solution) was the solution that worked for me. Checking the |
Beta Was this translation helpful? Give feedback.
At the moment you’ll need a personal access token for that.
@Phanatic:
Related issue