Thursday, March 28, 2024

 how to give access to private packages in the github packages 

specific biz.daich.common and other 

followed this answer https://github.com/orgs/community/discussions/26634

created github user daichReadOnly 

gave it access to the biz.daich repo. Note that there is no such thing as Read Only Caloborator on the private repository. So daichReadOnly has write access.

Under this user created a CLASSIC TOKEN with read:packages only permissions and no expiration date

the result will be some token of the form 

ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXX

then run 

docker run jcansdale/gpr encode <THE TOKEN>

as result get something like 

-------------


<repository>

<id>github-biz.daich</id>

<url>https://public:&#103;hp_XXXXXXXXX@maven.pkg.github.com/BorisDaich/biz.daich</url>

</repository>


-------------


to put it in the <repositories> section of a POM.XML that need to pull in the packages


tested to work.

Followers