Cross access to github packages over repos

The repo hub-server needs packages from the repo hub-openapi.

How we can configure the install access?

Thank you!

Hi @martinoppitz – I’m from the Packages team and can help you out here.

Right now, the best way to get cross-repo support is by minting a personal access token that has (at least read) access to both repositories.

We are, however, working on more robust support for the cross-repo use case, so it’s on our roadmap :slight_smile:

1 Like

Hi @martinoppitz,

I’ve sent you a PR with some suggestions:

What this PR does

  • Embed an encoded read:packages PAT in settings.xml
  • Add .mvn/maven.config file with -s .mvn/settings.xml option
  • Don’t pass ${{ secrets.GITHUB_TOKEN }} to mvn clean package

These changes will allow this project to be built with simply mvn clean package.

The read:packages PAT was encoded to prevent it from being automatically deleted by GitHub when pushed to a public repository. I’d recommend you create your own read:packages PAT and encode it like this:

docker run jcansdale/gpr encode <PAT with read:packages scope>

I can’t guarantee the one I’ve used in this PR will be around forever!

I’d prefer the password to have been a property in the settings.xml file (see 6b7dadf) so it could be re-used across multiple server elements (if necessary). Unfortunately I couldn’t figure out how to make this work. :cry:

Please let me know how you get on and if you come up with any refinements!