|
| 1 | +--- |
| 2 | +title: Automatic Dependabot access to {% data variables.product.github %}-hosted registries |
| 3 | +intro: 'Keep your private dependencies up to date reliably by granting {% data variables.product.prodname_dependabot %} automatic access to {% data variables.product.prodname_registry %} and {% data variables.product.prodname_container_registry %}, so you never need to create or rotate credentials for these registries.' |
| 4 | +versions: |
| 5 | + feature: org-automatic-registry-access |
| 6 | +shortTitle: Automatic registry access |
| 7 | +allowTitleToDifferFromFilename: true |
| 8 | +contentType: concepts |
| 9 | +category: |
| 10 | + - Secure your dependencies |
| 11 | +--- |
| 12 | + |
| 13 | +## About automatic access to {% data variables.product.github %}-hosted registries |
| 14 | + |
| 15 | +{% data variables.product.prodname_dependabot %} can authenticate to private {% data variables.product.prodname_registry %} and {% data variables.product.prodname_container_registry %} packages using the same access grants that {% data variables.product.prodname_actions %} workflows use. If a package has granted your repository **Read** access in the package settings on {% data variables.product.github %}, {% data variables.product.prodname_dependabot %} can access that package automatically. |
| 16 | + |
| 17 | +This eliminates the need to: |
| 18 | + |
| 19 | +* Create and manage {% data variables.product.pat_generic_plural %} for registry access |
| 20 | +* Manually configure access to {% data variables.product.github %}-hosted registries in your `dependabot.yml` file |
| 21 | +* Rotate credentials when tokens expire |
| 22 | + |
| 23 | +## How automatic access works |
| 24 | + |
| 25 | +{% data variables.product.prodname_dependabot %} uses its `GITHUB_TOKEN` to request `packages: read` permission when pulling from `*.pkg.github.com` and {% data variables.product.prodname_container_registry_namespace %}. Any package that has granted your repository access through "Manage Actions access" accepts this token, the same way it would for a regular {% data variables.product.prodname_actions %} workflow. See [AUTOTITLE](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package).git s |
| 26 | + |
| 27 | +This works for every {% data variables.product.prodname_registry %} ecosystem that {% data variables.product.prodname_dependabot %} supports. |
| 28 | + |
| 29 | +## When to use automatic access |
| 30 | + |
| 31 | +Use automatic access to {% data variables.product.github %}-hosted registries when: |
| 32 | + |
| 33 | +* Your repositories depend on private packages stored in {% data variables.product.prodname_registry %} or {% data variables.product.prodname_container_registry %}. |
| 34 | +* You want to reduce credential management overhead. |
| 35 | +* You want to avoid silent update failures caused by expired {% data variables.product.pat_generic_plural %}. |
| 36 | + |
| 37 | +For third-party registries (such as Artifactory, Azure Artifacts, or Nexus), you can only use the `dependabot.yml` registry configuration or organization-level private registry settings. See [AUTOTITLE](/code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/configuring-access-to-private-registries-for-dependabot). |
| 38 | + |
| 39 | +## How to enable automatic access |
| 40 | + |
| 41 | +For each package that {% data variables.product.prodname_dependabot %} needs to read, you need to go to the package's settings page and add the repository that runs {% data variables.product.prodname_dependabot %} with **Read** access. See [AUTOTITLE](/code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/configuring-access-to-private-registries-for-dependabot#configuring-private-github-hosted-registries). |
| 42 | + |
| 43 | +Once the repository has been granted access, {% data variables.product.prodname_dependabot %} can pull from that package automatically. You do not need to configure the `dependabot.yml` file, and you can remove any existing {% data variables.product.pat_generic %}-based registry entries you previously added for these packages. |
| 44 | + |
| 45 | +For more information about configuring package access, see [AUTOTITLE](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package). |
0 commit comments