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.
github-package-registry
235
questions
44
votes
5
answers
55k
views
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 ...
30
votes
5
answers
39k
views
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 ...
29
votes
5
answers
26k
views
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 ...
27
votes
5
answers
12k
views
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....
26
votes
4
answers
23k
views
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 ...
25
votes
4
answers
12k
views
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 are:
github....
24
votes
5
answers
14k
views
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 ...
19
votes
4
answers
20k
views
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 ...
19
votes
5
answers
21k
views
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 ...
19
votes
6
answers
12k
views
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
...
16
votes
6
answers
13k
views
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....
15
votes
2
answers
12k
views
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 ...
15
votes
5
answers
30k
views
Error response from daemon: Get "https://ghcr.io/v2/": denied: denied
While using with the GitHub action I am getting Error response from daemon: Get "https://ghcr.io/v2/": denied: denied
I used the login command echo $CR_PAT | docker login ghcr.io -u $...
14
votes
3
answers
3k
views
GitHub packages: Single Maven repository for GitHub organization
I would like to use GitHub packages to store Maven artifacts for several repositories in a GitHub organization. Currently, it appears that for each project, a separate (Maven) repository configuration ...
14
votes
3
answers
6k
views
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 ...
14
votes
0
answers
885
views
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. ...
13
votes
3
answers
8k
views
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-...
12
votes
4
answers
8k
views
Cannot install npm package in Github registry
I have published a package to the GitHub npm registry. I can see the package when I login onto GitHub, as per the screenshots below.
ScreenShot 1
ScreenShot 2
Locally, a different package has the ...
11
votes
2
answers
9k
views
How to access Maven dependency from Github Packages on a Github Actions workflow?
My build is working locally by using a User + PAT (personal access token) directly on the pom.xml <repository> element:
<repository>
<id>github</id>
<name>GitHub ...
10
votes
1
answer
4k
views
Accessing Private Maven Github Package Registry with Gradle
I have a private repository under user X and repository name Y:
https://github.com/X/Y
This a Java project built with Gradle.
The Gradle configuration file has been configured as explained in the ...
10
votes
2
answers
4k
views
List nuget packages on GitHub Packages
I have nuget packages hosted on GitHub Packages. Then, when I try to list the packages in the github nuget feed using nuget.exe, it tells me that it can't list the packages in the feed:
> nuget ...
9
votes
3
answers
5k
views
Public and private packages in GitHub Package Registry
Is it possible to change package visibility from private to public and vice versa?
In documentation there is a statement:
Private and public software packages: You can host packages privately or ...
9
votes
3
answers
4k
views
Use GitHub package registry as a PowerShell package repository
As far as I know a PowerShell repository is a NuGet repository...
GitHub just released their package registry, which my company currently uses for npm, but also has an endpoint for NuGet.
I can ...
9
votes
2
answers
8k
views
GitHub Packages Docker - Error pulling image configuration: unknown blob
GitHub packages started returning error pulling image configuration: unknown blob this weekend when trying to pull docker images. It still works to push images to the registry. I haven't found any ...
8
votes
0
answers
2k
views
Publish SNAPSHOT to GitHub Packages with Gradle
I'm having a hard time publishing a Java library in its 0.0.1-SNAPSHOT version to GitHub Packages.
The library is a Gradle project. It would appear that, when the version is not on GitHub (yet), it ...
8
votes
0
answers
3k
views
Maven deploy error 'Could not find artifact'
I was trying to use the github packages, I followed all the steps in their basic tutorial, but I can't deploy, I already looked on several sites to fix this, but none worked.
Error on deploy:
Failed ...
8
votes
2
answers
2k
views
Gradle fails to download package from Github Package Registry
Uploading the public package with gradle works:
https://github.com/ttiganik/hrd-java-test-registry/packages/61312
But I am unable to download it. I tried different URL-s and package names, but none ...
8
votes
4
answers
2k
views
How to upload maven plugin to Github packages?
Consider I have a maven plugin project and I want to publish it to Github's public maven repository called "Github Packages". I've done everything by instruction and for normal projects everything ...
7
votes
4
answers
4k
views
How to reference public GitHub packages from maven project
I have a GitHub repo with a library published to its own GitHub packages maven repository. And I also have another project where I want to reference this library as a dependency.
When I add the ...
7
votes
3
answers
5k
views
Download private module from Github Package Registry via Yarn within a Github Action? Publishing works, but installing is met with '401 Unauthorized'
For various reasons we are stuck using yarn managing our packages so we can't rely on a package-lock.json to use npm with github actions.
We cannot get Yarn to authenticate as part of a github action....
7
votes
3
answers
4k
views
Getting 422:Unprocessable Entity when trying to add maven package form github registry to a gradle file
I have a jar out in gitHub package registry called test.jar (version: 1.0.5), the repository name is testRepo, owner name: tejas3108.
I am trying to add this jar as a dependency in my other gradle ...
7
votes
3
answers
9k
views
GitHub actions: NPM publish fails with ERR! code ENEEDAUTH
I've attempted to implement the official guide to publishing and installing a package with GitHub Actions: Authenticating to package registries with granular permissions
Fails with:
npm ERR! code ...
7
votes
1
answer
11k
views
How to run a Docker Compose image pulled from GitHub Packages
I have pushed a Docker image on GitHub Packages and now I would like to pull it and use it.
To run the image locally, I used to go to the related folder and run it with the command docker-compose up.
...
7
votes
2
answers
24k
views
Personal Access Tokens for install Github npm packages
I managed to publish a simple test package on the Github packageregistry using this tutorial : https://docs.github.com/en/packages/quickstart
Now, if I understand correctly, to use it in a project I ...
7
votes
2
answers
8k
views
Installing private Github Package using yarn on Github Actions is Unauthorized with yarn.lock
There are a lot of similar issues already floating around:
Install private github package from package.json on Github Actions
Download private module from Github Package Registry via Yarn within a ...
7
votes
0
answers
831
views
GitHub Packages 404 for maven-metadata.xml / does it support dynamic version resolution?
Has anyone managed to get Maven dynamic version resolution working with GitHub packages?
I want to be able to declare a dependency with a dynamic version and have it resolved, like this:
...
6
votes
2
answers
7k
views
How to download a JAR from Github Package Registry for a specific Release version
Goal
I want to have two repositories:
Repository A: Publishes a JAR to Github Registry
Repository B: Downloads the JAR from A and publishes a Docker Image containing the JAR.
I.e. I'm searching for ...
6
votes
4
answers
9k
views
gitlab npm publish not working: This command requires you to be logged in
I am new to this gitlab world.
I have one private project. I am able to publish the package using command prompt.
My .npmrc file
@ui-practice:registry=https://gitlab.MyCompany.com/api/v4/packages/npm/
...
6
votes
2
answers
4k
views
Installing a GitHub Package in CircleCI
For my project, I am trying to install (not publish!) a npm package from GitHub Packages. It is hosted on a private repository, which is in an org. I have made a personal access token with the ...
6
votes
1
answer
3k
views
How do you publish and install a private npm package to GitHub packages as an organisation?
We have a monorepo with a shared package called "@myorganization/common", that is used by both the app and Google cloud functions.
Google cloud functions requires that the package is ...
5
votes
2
answers
4k
views
How to access github package registry from one repo to other under same organization?
I'm working under organization Org which has two different repositories repo-1 and repo-2.
I had uploaded some 50 odd Maven dependencies to GitHub Packages registry of repo-1 and now we're migrating ...
5
votes
1
answer
1k
views
Comparison between Verdaccio and Github package registry
I'm looking for some comparison between this to registry, did anyone try both?
Why I should use one or another?
What are the pros and cons of each registry?
5
votes
1
answer
4k
views
Automating the build and publish process with GitHub Actions (and GitHub Package Registry)
This is sorta Q&A, I've put my solution in the answers.
I'm part of both the GitHub Actions beta and the GitHub Package Registry beta. Since I'm a very lazy person I not only automated the build ...
5
votes
1
answer
2k
views
github hosted package fails when doing npm publish
This was working fine last week so not sure what has happened. (Apologies for some of the formatting as its a lot of lines of log)
Node version: v10.15.3
npm version: 6.4.1
I do npm publish in my ...
5
votes
2
answers
2k
views
How to Add My Android Library's Dependencies in Github Packages?
I am building an Android library (say, MyLibrary) which will be added to other apps of my company. The library has some dependencies in the build.gradle file like this:
dependencies{
...
5
votes
3
answers
3k
views
Install NuGet package from GitHub Package Registry
After a lot of trial and error I eventually got my NuGet package on the Github package registry with the following actions/commands:
Go to GitHub
Click your avatar (top-right) → Settings → Developer ...
5
votes
0
answers
362
views
Getting Github Packages Download Numbers through the API?
I want to be able to grab the download numbers from a Github Packages through the API.
For instance, if you look on the Homebrew packages page for sqlite, you'll see there's a number to the right of ...
5
votes
1
answer
930
views
Install a Nuget Package from Github Packages Within a Github Action
I am trying to install a Nuget package that is hosted in Github Packages while running a Github Action.
This command works to add the source and the build is working:
dotnet nuget add source https://...
4
votes
2
answers
4k
views
Unable to pull public image from Github Container Registry (GHCR)
I have pushed an image to Github Container Registry (GHCR) and made it public.
When I try to pull it, I get an error (I've already done docker login).
docker pull ghcr.io/username/reponame:master
...
4
votes
3
answers
3k
views
How do I publish NuGet packages to GitHub Package Registry using dotnet on Mac?
The documentation is not complete and currently I cannot consume or publish package to GPR using dotnet on Mac. Any help would be useful