Skip to content

How to make Github packages to the public #25629

Answered by jcansdale
hantsy asked this question in Packages
Discussion options

You must be logged in to vote

Hi @hantsy,

hantsy:
  • Is it possible to make the repository public to access(without an auth token)?

At the moment a token is always required, but it is possible to encode/embed the token in your .pom file.

Here is how you would do it:

  1. Create a PAT with just the read:packages scope
  2. Execute $ docker run ghcr.io/jcansdale/gpr encode <PAT>
  3. This will generate a repositories element you can use in your .pom file

The repositories element will look something like this:

<repositories>
  <repository>
    <id>github-public</id>
    <url>https://public:&#102;xxxxxxx@maven.pkg.github.com/<OWNER>/*</url>
  </repository>
</repositories>

Replace <OWNER> with your user or org name.

Note, the read…

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
1 reply
@hantsy
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@gilberto-009199
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Packages Host your dependencies, libraries, and production-ready code, right from your repository Product Feedback
5 participants