Packages
About Permissions
github.token or GITHUB_TOKEN by default is scoped to the repository an Action runs in. Therefore, it cannot be used by default to consume packages created by other repositories, even in the same organization without either a configured PAT token with read:packages scope or where supported, allowing repositories to access a package.
There are up-to two ways to consume packages generated by other repositories depending on the package type:
- Option A: Personal Access Token with
read:packagesscope see Creating a PAT. - Option B: Manage Actions access in the package registry.
TBC: Viability of Option B and how-to.
Maven Packages
Only option A is supported for Maven packages.
To download private Maven dependencies from GitHub Packages, configure Maven to authenticate with your GitHub username and a Classic Personal Access Token (PAT).
- Open
C:\Users\<user>_esprofile\.m2, replacing<user>with your Windows username. Create the.m2directory if it does not already exist. - Create a file named
settings.xmlin that directory. If the file already exists, add thegithubserver entry to its existing<servers>element instead of replacing the file. - Add the following configuration:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 https://maven.apache.org/xsd/settings-1.1.0.xsd">
<servers>
<server>
<id>github</id>
<username>YOUR_USERNAME</username>
<password>GH_PAT_TOKEN</password>
</server>
</servers>
</settings>
- Replace
YOUR_USERNAMEwith your GitHub username andGH_PAT_TOKENwith your Classic PAT. The token must include theread:packagesscope and, for packages in private repositories, thereposcope. See Creating a Classic Personal Access Token for instructions.
If you previously completed the development setup, your PAT may already be stored in theNODE_AUTH_TOKENuser environment variable.
settings.xml or share its contents.Maven can now authenticate with GitHub Packages and download the dependencies used by ESP projects.
NPM Packages
Both option A or option B are supported for NPM packages.
Containers
Both option A and option B are supported for container images.

