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
6
votes
1 answer

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 gets created successfully, however after that, it…
6
votes
1 answer

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. However now, by pulling from GitHub Packages, I…
6
votes
4 answers

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 following configuration to the POM file of my project…
Alexey Anufriev
  • 415
  • 6
  • 19
6
votes
1 answer

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 published to a repo to use it, since we do not publish compiled…
Xiiryo
  • 3,021
  • 5
  • 31
  • 48
6
votes
2 answers

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 Github Action? Publishing works, but installing is…
Alec
  • 2,432
  • 2
  • 18
  • 28
6
votes
2 answers

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 required permission to read from that repo and org. All…
5
votes
1 answer

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://nuget.pkg.github.com//index.json -n…
jjnguy
  • 136,852
  • 53
  • 295
  • 323
5
votes
2 answers

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 an API which looks like: wget…
hb0
  • 3,350
  • 3
  • 30
  • 48
5
votes
3 answers

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 settings → Personal access tokens Generate a…
Pieterjan
  • 2,738
  • 4
  • 28
  • 55
5
votes
1 answer

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?
Diego
  • 493
  • 1
  • 9
  • 26
5
votes
1 answer

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 project folder and get the following error: npm ERR!…
5
votes
2 answers

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{ implementation 'com.alimuzaffar.lib:pinentryedittext:2.0.6' …
Qazi Fahim Farhan
  • 2,066
  • 1
  • 14
  • 26
4
votes
2 answers

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 ENEEDAUTH npm ERR! need auth This command requires…
4
votes
0 answers

Proper structure for NPM package containing only typescript models?

I am trying to create a shared project / NPM package that will contain shared typescript models across a couple different projects. I managed to get the package published to GitHub and am able to install it. I can't seem to figure out the correct…
Tristan
  • 1,608
  • 1
  • 20
  • 34
4
votes
2 answers

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 have to create a .npmrc file with the following…
Nite
  • 323
  • 1
  • 4
  • 12
1 2
3
15 16