Skip to content

Commit 4704269

Browse files
committed
Add example registry authentication string
1 parent 9b424ac commit 4704269

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ You can now use ``codeql pack publish``, ``codeql pack download``, and ``codeql
103103
Authenticating to GitHub Container registries
104104
---------------------------------------------
105105

106-
You can download a private pack or publish a pack by authenticating to the appropriate GitHub Container registry.
106+
You can publish packs and download private packs by authenticating to the appropriate GitHub Container registry.
107107

108108
You can authenticate to the Container registry on GitHub.com in two ways:
109109

@@ -115,5 +115,10 @@ Similarly, you can authenticate to a GHES Container registry, or authenticate to
115115
1. Pass the ``--registries-auth-stdin`` option to the CodeQL CLI, then supply a registry authentication string via standard input.
116116
2. Set the ``CODEQL_REGISTRIES_AUTH`` environment variable to a registry authentication string.
117117

118-
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.
118+
A registry authentication string is a comma-separated list of ``<registry-url>=<token>`` pairs, where ``registry-url`` is a GitHub Container registry URL, such as ``https://containers.GHE_HOSTNAME/v2/``, and ``token`` is a GitHub Apps token or personal access token for that GitHub Container registry.
119119
This ensures that each token is only passed to the Container registry you specify.
120+
For instance, the following registry authentication string specifies that the CodeQL CLI should authenticate to the Container registry on GitHub.com using the token ``<token1>`` and to the Container registry for the GHES instance at ``GHE_HOSTNAME`` using the token ``<token2>``:
121+
122+
.. code-block:: none
123+
124+
https://ghcr.io/v2/=<token1>,https://containers.GHE_HOSTNAME/v2/=<token2>

0 commit comments

Comments
 (0)