Questions tagged [github-package-registry]

GitHub Packages is a software package hosting service that allows you to host your software packages privately or publicly and use packages as dependencies in your projects. Questions regarding help on the GitHub Package Registry should use this tag.

About GitHub Packages

From the documentation about GitHub Packages:

GitHub Packages is a package hosting service, fully integrated with GitHub. GitHub Packages combines your source code and packages in one place to provide integrated permissions management and billing, so you can centralize your software development on GitHub.

You can publish packages in a public repository (public packages) to share with all of GitHub, or in a private repository (private packages) to share with collaborators or an organization. You can use GitHub roles and teams to limit who can install or publish each package, as packages inherit the permissions of the repository. Anyone with read permissions for a repository can install a package as a dependency in a project, and anyone with write permissions can publish a new package version.

You can host multiple packages in one repository and see more information about each package by viewing the package's README, download statistics, version history, and more.

You can integrate GitHub Packages with GitHub APIs, GitHub Actions, and webhooks to create an end-to-end DevOps workflow that includes your code, CI, and deployment solutions.

Resources

229 questions
36
votes
5 answers

Github actions, 401 unauthorized when installing a Github Package with npm or yarn

When I try to install my npm modules from a GitHub action I get the following error: npm ERR! 401 Unauthorized - GET https://npm.pkg.github.com/@xxxx%2fxxxx-analytics - Your request could not be authenticated by the GitHub Packages service. Please…
MLyck
  • 4,959
  • 13
  • 43
  • 74
28
votes
4 answers

Installing private package from Github Package registry fails with not found/not authorized

I created and published a private Github package. Trying to install it with yarn at first, I face the following issue: Whether I try with yarn or npm, it cannot find the package at all although following the exact steps documented by Github…
alexeis
  • 2,152
  • 4
  • 23
  • 30
26
votes
5 answers

Not Found - PUT https://npm.pkg.github.com/package-name

I'm trying to upload a package on GPR (Github Package registry). I log in successfully: npm login --registry=https://npm.pkg.github.com and then run these command: npm set registry https://npm.pkg.github.com/ npm publish which returns this…
kaxi1993
  • 4,535
  • 4
  • 29
  • 47
25
votes
4 answers

Installing private package from Github Package registry using Yarn fails with not authorized

This question is related to these. But none of the solutions worked for me. Yarn can't find private Github npm registry Installing private package from Github Package registry fails with not found/not authorized I can install a package without…
MLyck
  • 4,959
  • 13
  • 43
  • 74
24
votes
4 answers

Publishing Github packages for a monorepo as part of an organization

I have a Lerna monorepo on Github Enterprise which currently has two npm packages that I'm trying to publish to the Github package registry under the same repo. For reference say they…
MVarrieur
  • 513
  • 1
  • 5
  • 19
21
votes
3 answers

How to use github nuget packages on Visual Studio 2019

I try to learn Github action and packages. So, I create a sample nuget package and successfully created. However I could not use it. I follow this step; Options > Nuget Package Manager > Package Sources Click add button write organization name and…
19
votes
3 answers

Publishing GitHub Packages returns 422 error

I have been using GitHub packages for a while, in an Android project, without having any issue. Now when I try to publish a new package I get the error: Could not PUT Received status code 422 from server: Unprocessable Entity To be sure that I…
kingston
  • 11,053
  • 14
  • 62
  • 116
19
votes
5 answers

How to delete/remove/unlink/unversion a package from the Github Package Registry

Question: How can I make a package "disappear" from Github Package Registry? Documentation says: You cannot "delete" but a package "disappears" when all versions are removed. Background: A typo in the Gradle publish task resulted in the release…
hb0
  • 3,350
  • 3
  • 30
  • 48
19
votes
3 answers

Unable to login to GitHub Package Registry

I am trying to release npm package through GitHub Package Registry, I am following the documentation, When I try to login using the below command after entering the username and password(even though both are correct), I am getting below error…
kgangadhar
  • 4,886
  • 5
  • 36
  • 54
18
votes
5 answers

deploy to Github Package Registry from Github Action

I would like to deploy to a GitHub Package Registry from a GitHub Action of a public repo. I have a yml file for a workflow: name: My CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name:…
erdos
  • 3,135
  • 2
  • 16
  • 27
14
votes
0 answers

Can a package be published to both github and npm? (with a single `npm publish`)

I got access to the github package registry beta, just fiddled with it and followed the configuration steps to publish. The thing is, I published it correctly, but noticed it didn't publish to npm. Is there a way to publish in both registries with…
Alvaro Castro
  • 811
  • 1
  • 9
  • 26
14
votes
2 answers

How to add GitHub Package Registry package as a Gradle dependency

So, I have a GitHub project with a Package Registry configured. It has two packages: Package pages have instructions only for Maven, besides that, the instructions are broken (maven install so57323260 is not a valid way to add a dependency in…
madhead
  • 31,729
  • 16
  • 153
  • 201
14
votes
5 answers

How to push to Github package registry with Gradle

Trying to push the Gradle project to Github package registry, but not working as expected. Using io.freefair.github.package-registry-maven-publish plugin for Gradle. Configure GitHub in build.gradle with data needed to publish - code below. And run…
Serhii Zadorozhnyi
  • 576
  • 2
  • 8
  • 25
13
votes
3 answers

401 Unauthorized downloading a public package from GitHub Packages using Gradle

I am the maintainer of a public GitHub repo. I have set up GitHub Actions to build a publish to GitHub Packages. You can see the package has been created here: https://github.com/paulschwarz/spring-dotenv/packages/135114 The first thing I notice is…
Paul Schwarz
  • 1,828
  • 1
  • 15
  • 24
13
votes
3 answers

How do you upload a Maven artifact to Github Packages using the command line?

I am trying to upload a Maven artifact I haven't built to my Organization's GitHub package registry. I am using the deploy:deploy-file Maven plugin in order to do so. Here is the command I have been using: mvn deploy:deploy-file -Dfile=[THE JAR…
archer64
  • 131
  • 1
  • 4
1
2 3
15 16