Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e4462b7

Browse files
committed
Add a section on authenticating to Container registries
1 parent 5931ea4 commit e4462b7

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

docs/codeql/codeql-cli/publishing-and-using-codeql-packs.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,21 @@ For example, the following ``qlconfig.yml`` file associates all packs with the C
9090
url: https://ghcr.io/v2/
9191
9292
You can now use ``codeql pack publish``, ``codeql pack download``, and ``codeql database analyze`` to manage packs on GitHub Enterprise Server.
93+
94+
Authenticating to GitHub Container registries
95+
---------------------------------------------
96+
97+
You can download a private pack or publish a pack by authenticating to the appropriate GitHub Container registry.
98+
99+
You can authenticate to the GitHub.com Container registry in two ways:
100+
101+
1. Pass the ``--github-auth-stdin`` option to the CodeQL CLI, then supply a GitHub Apps token or personal access token via standard input.
102+
2. Set the ``GITHUB_TOKEN`` environment variable to a GitHub Apps token or personal access token.
103+
104+
Similarly, you can authenticate to a GHES Container registry, or authenticate to multiple registries simultaneously (for example to download or analyze private packs from multiple registries) in two ways:
105+
106+
1. Pass the ``--registries-auth-stdin`` option to the CodeQL CLI, then supply a registry authentication string via standard input.
107+
2. Set the ``CODEQL_REGISTRIES_AUTH`` environment variable to a registry authentication string.
108+
109+
A registry authentication string is a comma-separated list of ``<registry-url>=<token>`` pairs, where ``registry-url`` is a GitHub Container registry URL, for example ``https://containers.GHE_HOSTNAME/v2/`` and ``token`` is a GitHub Apps token or personal access token for that GitHub Container registry.
110+
This ensures that each token is only passed to the Container registry you specify.

0 commit comments

Comments
 (0)