Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 make them public. You can host packages privately and share them with your coworkers or organization, or make them public for the entire world.

But I can't find any setting in the repo or info in documentation on how to make the package public.

Use case I'm trying to achieve: Private repository with SDK source code and public (stable releases) / private (internal testing) packages.

We can just make a separate public repo with public releases, but it's a bit overhead and breaks the main idea of hosting code and packages in one place:

GitHub Package Registry is a software package hosting service, similar to npmjs.org, rubygems.org, or hub.docker.com, that allows you to host your packages and code in one place.

Will appreciate any help and information.

like image 314
Konstantin Tselykh Avatar asked Sep 11 '19 11:09

Konstantin Tselykh


People also ask

Are GitHub packages public?

About published packagesYou 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. A repository can be connected to more than one package.

Is GitHub container registry private?

A Container Registry is a place to store and manage container images. These container images can be either Public and Private. The Public container images are accessible by anyone, whereas you can configure access control for Private container images.

How do I publish a private package to GitHub?

A private repository will be published as a private npm package. Perhaps the first step in making your package private is to make your package's repository private. To make your Github repository private, click on the Settings tab, scroll to the bottom and then click on Change repository visibility.


1 Answers

As you suspected there is no way to set the visibility on a package basis at the moment. It is based on the visibility of the repo.

From the launch notes:

Packages on GitHub inherit the visibility and permissions associated with the repository, and organizations no longer need to maintain a separate package registry and mirror permissions across systems.

like image 131
Pistus Avatar answered Sep 28 '22 16:09

Pistus