About private registries
Dependabot version updates keeps your dependencies up-to-date and Dependabot security updates updates vulnerable dependencies. Dependabot can access public registries. In addition, you can give Dependabot access to private package registries and private GitHub repositories so that you can keep your private and innersource dependencies as up-to-date and secure as your public dependencies.
In most ecosystems, private dependencies are usually published to private package registries. These private registries are similar to their public equivalents, but they require authentication.
For specific ecosystems, you can configure Dependabot to access only private registries by removing calls to public registries. For more information, see Removing Dependabot access to public registries.
To allow Dependabot access to registries hosted privately or restricted to internal networks, configure Dependabot to run on GitHub Actions self-hosted runners. For more information, see Managing Dependabot on self-hosted runners.
Configuring private registries
You can configure Dependabot's access to private registries at the org-level. For more information on how to configure that, see 프라이빗 레지스트리에 대한 보안 기능 액세스 권한 부여.
You can also configure Dependabot's access to private registries in the dependabot.yml file.
The top-level registries key is optional and specifies authentication details.
dependabot.yml 파일에는 registries 키를 사용할 수 있는 2개의 위치가 있습니다.
- 최상위 수준으로 필요한 경우 레지스트리 및 해당 액세스 정보를 정의할 수 있습니다.
updates블록 내에서registries: "*"를 사용하여 Dependabot에게 최상위 수준에서 정의한 레지스트리의 일부 또는 전부를 사용하도록 지시할 수 있습니다.
# registries: gradle-artifactory - provides access details for the gradle-artifactory registry
# registries: "*" - allows Dependabot to use all the defined registries specified at the top level
version: 2
registries:
gradle-artifactory:
type: maven-repository
url: https://acme.jfrog.io/artifactory/my-gradle-registry
username: octocat
password: ${{secrets.MY_ARTIFACTORY_PASSWORD}}
updates:
- package-ecosystem: "gradle"
directory: "/"
registries: "*"
schedule:
interval: "monthly"
다음 옵션을 사용하여 액세스 설정을 지정합니다. 레지스트리 설정은 type과 url을 포함해야 하며, 일반적으로 username 및 password 조합이나 token을 포함해야 합니다.
| 매개 변수 | 목적 |
|---|---|
REGISTRY_NAME | 필수: 레지스트리에 대한 식별자를 정의합니다. |
type | 필수: 레지스트리의 형식을 식별합니다. |
| 인증 세부 정보 | 필수: 인증 세부 정보를 제공하는 데 지원되는 매개 변수는 다양한 유형의 레지스트리에 따라 다릅니다. |
url | 필수: 이 레지스트리의 종속성에 액세스하는 데 사용할 URL입니다. 프로토콜은 선택 사항입니다. 지정하지 않으면 https://가 가정됩니다. Dependabot은 필요에 따라 후행 슬래시를 추가하거나 무시합니다. |
replaces-base | 부울 값이 true인 경우, Dependabot은 해당 에코시스템의 기본 URL이 아닌 지정된 url을(를) 사용하여 종속성을 해결합니다. |
For more information about the configuration options that are available and about the supported types, see Dependabot 옵션 참조.
Storing credentials for Dependabot to use
To give Dependabot access to the private registries supported by GitHub, you store the registry’s access token or secret in the secret store for your repository or organization.
About encrypted secrets for Dependabot
Dependabot secrets are encrypted credentials that you create at either the organization level or the repository level. When you add a secret at the organization level, you can specify which repositories can access the secret. You can use secrets to allow Dependabot to update dependencies located in private package registries. When you add a secret, it's encrypted before it reaches GitHub and it remains encrypted until it's used by Dependabot to access a private package registry.
Dependabot secrets also include secrets that are used by GitHub Actions workflows triggered by Dependabot pull requests. Dependabot itself may not use these secrets, but the workflows require them. For more information, see GitHub Actions의 Dependabot 문제 해결.
After you add a Dependabot secret, you can reference it in the dependabot.yml configuration file like this: ${{secrets.NAME}}, where "NAME" is the name you chose for the secret. For example:
password: ${{secrets.MY_ARTIFACTORY_PASSWORD}}
password: ${{secrets.MY_ARTIFACTORY_PASSWORD}}
Naming your secrets
The name of a Dependabot secret:
- Can only contain alphanumeric characters (
[A-Z],[0-9]) or underscores (_). Spaces are not allowed. If you enter lowercase letters these are changed to uppercase. - Must not start with the
GITHUB_prefix. - Must not start with a number.
Adding a repository secret for Dependabot
개인용 계정 리포지토리에 대한 비밀을 만들려면 리포지토리 소유자여야 합니다. 조직 리포지토리에 대한 비밀을 만들려면 admin 액세스 권한이 있어야 합니다.
-
GitHub에서 리포지토리의 기본 페이지로 이동합니다.
-
리포지토리 이름 아래에서 Settings를 클릭합니다. "설정" 탭이 표시되지 않으면 드롭다운 메뉴를 선택한 다음 설정을 클릭합니다.

-
사이드바의 "Security" 섹션에서 Secrets and variables를 선택하고 Dependabot 을 클릭합니다.
-
Click New repository secret.
-
Type a name for your secret in the Name input box.
-
Enter the value for your secret.
-
Click Add secret.
The name of the secret is listed on the Dependabot secrets page. You can click Update to change the secret value. You can click Remove to delete the secret.
Adding an organization secret for Dependabot
When creating a secret in an organization, you can use a policy to limit which repositories can access that secret. For example, you can grant access to all repositories, or limit access to only private repositories or a specified list of repositories.
조직 수준에서 비밀을 만들려면 admin 액세스 권한이 있어야 합니다.
-
GitHub에서 조직의 기본 페이지로 이동합니다.
-
조직 이름에서 설정을 클릭합니다. "설정" 탭이 표시되지 않으면 드롭다운 메뉴를 선택한 다음 설정을 클릭합니다.

-
사이드바의 "Security" 섹션에서 Secrets and variables를 선택하고 Dependabot 을 클릭합니다. Ignore the "Private Registries" option, this is used only by code scanning default setup.
-
Click New organization secret.
-
Type a name for your secret in the Name input box.
-
Enter the Value for your secret.
-
From the Repository access dropdown list, choose an access policy.
-
If you chose Selected repositories:
- Click .
- In the dialog box, select the repositories that can access this secret.
- Click Update selection.
-
Click Add secret.
The name of the secret is listed on the Dependabot secrets page. You can click Update to change the secret value or its access policy. You can click Remove to delete the secret.
Configuring firewall IP rules
You can add Dependabot-related IP addresses to your registries IP allow list.
If your private registry is configured with an IP allow list, you can find the IP addresses Dependabot uses to access the registry in the meta API endpoint, under the actions key. For more information, see 메타 데이터에 대한 REST API 엔드포인트 and GitHub Actions 실행기의 Dependabot 정보.
Allowing external code execution
When you give Dependabot access to one or more registries, external code execution is automatically disabled to protect your code from compromised packages. However, some version updates may fail.
If you need to allow Dependabot to access a private package registry and enable limited external code execution, you can set insecure-external-code-execution to allow. Allowing Dependabot to execute external code in the manifest during updates is not as scary as it sounds:
- Any external code execution will only have access to the package managers in the registries associated with the enclosing
updatessetting. - There is no access allowed to any of the registries defined in the top level
registriesconfiguration.
It is common for tooling, such as bundler, mix, pip, and swift, to allow the execution of external code by default.
In this example, the configuration file allows Dependabot to access the ruby-github private package registry. In the same updatessetting, insecure-external-code-executionis set to allow, which means that the code executed by dependencies will only access the ruby-github registry, and not the dockerhub registry.
# Allow external code execution when updating dependencies from private registries
version: 2
registries:
ruby-github:
type: rubygems-server
url: https://rubygems.pkg.github.com/octocat/github_api
token: ${{secrets.MY_GITHUB_PERSONAL_TOKEN}}
updates:
- package-ecosystem: "bundler"
directory: "/rubygems-server"
insecure-external-code-execution: allow
registries: "*"
schedule:
interval: "monthly"
# Allow external code execution when updating dependencies from private registries
version: 2
registries:
ruby-github:
type: rubygems-server
url: https://rubygems.pkg.github.com/octocat/github_api
token: ${{secrets.MY_GITHUB_PERSONAL_TOKEN}}
updates:
- package-ecosystem: "bundler"
directory: "/rubygems-server"
insecure-external-code-execution: allow
registries: "*"
schedule:
interval: "monthly"
Supported private registries
Examples of how to configure access to the private registries supported by Dependabot.
cargo-registrycomposer-repositorydocker-registrygitgoproxy-serverhex-organizationhex-repositorymaven-repositorynpm-registrynuget-feedpub-repositorypython-indexrubygems-serverterraform-registry
cargo-registry
The cargo-registry type supports a token.
이 레지스트리 유형은 url 옵션에 제공된 경로와 접두사가 일치합니다. 즉, 동일한 호스트에 여러 자격 증명을 제공할 수 있으며, 이 자격 증명은 고유 경로에 액세스하는 데 사용할 수 있습니다. 그러나 동일한 호스트에 여러 레지스트리가 없는 경우 레지스트리의 모든 경로가 자격 증명을 받도록 url에서 경로를 생략하는 것이 좋습니다.
registries:
cargo-example:
type: cargo-registry
registry: "name-of-your-registry"
url: https://cargo.cloudsmith.io/foobaruser/test/
token: "Token ${{secrets.CARGO_TOKEN}}"
프라이빗 레지스트리 https://cargo.cloudsmith.io에 대해 이 구성을 테스트했습니다.
composer-repository
The composer-repository type supports username and password. 계정이 GitHub 계정인 경우 암호 대신 GitHub personal access token을(를) 사용할 수 있습니다.
이 레지스트리 유형은 url 옵션에 제공된 경로와 접두사가 일치합니다. 즉, 동일한 호스트에 여러 자격 증명을 제공할 수 있으며, 이 자격 증명은 고유 경로에 액세스하는 데 사용할 수 있습니다. 그러나 동일한 호스트에 여러 레지스트리가 없는 경우 레지스트리의 모든 경로가 자격 증명을 받도록 url에서 경로를 생략하는 것이 좋습니다.
registries:
composer:
type: composer-repository
url: https://repo.packagist.com/example-company/
username: octocat
password: ${{secrets.MY_PACKAGIST_PASSWORD}}
registries:
composer:
type: composer-repository
url: https://repo.packagist.com/example-company/
username: octocat
password: ${{secrets.MY_PACKAGIST_PASSWORD}}
docker-registry
Dependabot works with any container registries that implement the OCI container registry spec. For more information, see https://github.com/opencontainers/distribution-spec/blob/main/spec.md. Dependabot supports authentication to private registries via a central token service or HTTP Basic Auth. For further details, see Token Authentication Specification in the Docker documentation and Basic access authentication on Wikipedia.
The docker-registry type supports username and password. 계정이 GitHub 계정인 경우 암호 대신 GitHub personal access token을(를) 사용할 수 있습니다.
이 레지스트리 유형은 url 옵션에 제공된 경로와 접두사가 일치합니다. 즉, 동일한 호스트에 여러 자격 증명을 제공할 수 있으며, 이 자격 증명은 고유 경로에 액세스하는 데 사용할 수 있습니다. 그러나 동일한 호스트에 여러 레지스트리가 없는 경우 레지스트리의 모든 경로가 자격 증명을 받도록 url에서 경로를 생략하는 것이 좋습니다.
registries:
dockerhub:
type: docker-registry
url: https://registry.hub.docker.com
username: octocat
password: ${{secrets.MY_DOCKERHUB_PASSWORD}}
replaces-base: true
registries:
dockerhub:
type: docker-registry
url: https://registry.hub.docker.com
username: octocat
password: ${{secrets.MY_DOCKERHUB_PASSWORD}}
replaces-base: true
The docker-registry type can also be used to pull from private Amazon ECR using static AWS credentials.
registries:
ecr-docker:
type: docker-registry
url: https://1234567890.dkr.ecr.us-east-1.amazonaws.com
username: ${{secrets.ECR_AWS_ACCESS_KEY_ID}}
password: ${{secrets.ECR_AWS_SECRET_ACCESS_KEY}}
replaces-base: true
registries:
ecr-docker:
type: docker-registry
url: https://1234567890.dkr.ecr.us-east-1.amazonaws.com
username: ${{secrets.ECR_AWS_ACCESS_KEY_ID}}
password: ${{secrets.ECR_AWS_SECRET_ACCESS_KEY}}
replaces-base: true
git
The git type supports username and password. 계정이 GitHub 계정인 경우 암호 대신 GitHub personal access token을(를) 사용할 수 있습니다.
registries:
github-octocat:
type: git
url: https://github.com
username: x-access-token
password: ${{secrets.MY_GITHUB_PERSONAL_TOKEN}}
registries:
github-octocat:
type: git
url: https://github.com
username: x-access-token
password: ${{secrets.MY_GITHUB_PERSONAL_TOKEN}}
goproxy-server
The goproxy-server type supports username and password. 계정이 GitHub 계정인 경우 암호 대신 GitHub personal access token을(를) 사용할 수 있습니다.
이 레지스트리 유형은 url 옵션에 제공된 경로와 접두사가 일치합니다. 즉, 동일한 호스트에 여러 자격 증명을 제공할 수 있으며, 이 자격 증명은 고유 경로에 액세스하는 데 사용할 수 있습니다. 그러나 동일한 호스트에 여러 레지스트리가 없는 경우 레지스트리의 모든 경로가 자격 증명을 받도록 url에서 경로를 생략하는 것이 좋습니다.
registries:
my-private-registry:
type: goproxy-server
url: https://acme.jfrog.io/artifactory/api/go/my-repo
username: octocat
password: ${{secrets.MY_GO_REGISTRY_TOKEN}}
registries:
my-private-registry:
type: goproxy-server
url: https://acme.jfrog.io/artifactory/api/go/my-repo
username: octocat
password: ${{secrets.MY_GO_REGISTRY_TOKEN}}
helm-registry
The helm-registry type only supports HTTP Basic Auth and does not support OCI-compliant registries. If you need to access an OCI-compliant registry for Helm charts, configure a docker-registry instead.
The helm-registry type supports username and password. 계정이 GitHub 계정인 경우 암호 대신 GitHub personal access token을(를) 사용할 수 있습니다.
이 레지스트리 유형은 url 옵션에 제공된 경로와 접두사가 일치합니다. 즉, 동일한 호스트에 여러 자격 증명을 제공할 수 있으며, 이 자격 증명은 고유 경로에 액세스하는 데 사용할 수 있습니다. 그러나 동일한 호스트에 여러 레지스트리가 없는 경우 레지스트리의 모든 경로가 자격 증명을 받도록 url에서 경로를 생략하는 것이 좋습니다.
registries:
helm_registry:
type: helm-registry
url: https://registry.example.com
username: octocat
password: ${{secrets.MY_REGISTRY_PASSWORD}}
registries:
helm_registry:
type: helm-registry
url: https://registry.example.com
username: octocat
password: ${{secrets.MY_REGISTRY_PASSWORD}}
hex-organization
The hex-organization type supports organization and key.
이 레지스트리 유형은 url 옵션에 제공된 경로와 접두사가 일치합니다. 즉, 동일한 호스트에 여러 자격 증명을 제공할 수 있으며, 이 자격 증명은 고유 경로에 액세스하는 데 사용할 수 있습니다. 그러나 동일한 호스트에 여러 레지스트리가 없는 경우 레지스트리의 모든 경로가 자격 증명을 받도록 url에서 경로를 생략하는 것이 좋습니다.
registries:
github-hex-org:
type: hex-organization
organization: github
key: ${{secrets.MY_HEX_ORGANIZATION_KEY}}
registries:
github-hex-org:
type: hex-organization
organization: github
key: ${{secrets.MY_HEX_ORGANIZATION_KEY}}
hex-repository
The hex-repository type supports an authentication key.
repo is a required field, which must match the name of the repository used in your dependency declaration.
The public-key-fingerprint is an optional configuration field, representing the fingerprint of the public key for the Hex repository. public-key-fingerprint is used by Hex to establish trust with the private repository. The public-key-fingerprint field can be either listed in plaintext or stored as a Dependabot secret.
registries:
github-hex-repository:
type: hex-repository
repo: private-repo
url: https://private-repo.example.com
auth-key: ${{secrets.MY_AUTH_KEY}}
public-key-fingerprint: ${{secrets.MY_PUBLIC_KEY_FINGERPRINT}}
registries:
github-hex-repository:
type: hex-repository
repo: private-repo
url: https://private-repo.example.com
auth-key: ${{secrets.MY_AUTH_KEY}}
public-key-fingerprint: ${{secrets.MY_PUBLIC_KEY_FINGERPRINT}}
maven-repository
The maven-repository type supports username, password and replaces-base. 계정이 GitHub 계정인 경우 암호 대신 GitHub personal access token을(를) 사용할 수 있습니다.
이 레지스트리 유형은 url 옵션에 제공된 경로와 접두사가 일치합니다. 즉, 동일한 호스트에 여러 자격 증명을 제공할 수 있으며, 이 자격 증명은 고유 경로에 액세스하는 데 사용할 수 있습니다. 그러나 동일한 호스트에 여러 레지스트리가 없는 경우 레지스트리의 모든 경로가 자격 증명을 받도록 url에서 경로를 생략하는 것이 좋습니다.
registries:
maven-artifactory:
type: maven-repository
url: https://acme.jfrog.io/artifactory/my-maven-registry
username: octocat
password: ${{secrets.MY_ARTIFACTORY_PASSWORD}}
replaces-base: true
registries:
maven-artifactory:
type: maven-repository
url: https://acme.jfrog.io/artifactory/my-maven-registry
username: octocat
password: ${{secrets.MY_ARTIFACTORY_PASSWORD}}
replaces-base: true
npm-registry
The npm-registry type supports username and password, or token. 계정이 GitHub 계정인 경우 암호 대신 GitHub personal access token을(를) 사용할 수 있습니다.
When using username and password, your .npmrc's auth token may contain a base64 encoded _password; however, the password referenced in your Dependabot configuration file must be the original (unencoded) password.
참고 항목
When using npm.pkg.github.com, don't include a path. Instead use the https://npm.pkg.github.com URL without a path.
registries:
npm-npmjs:
type: npm-registry
url: https://registry.npmjs.org
username: octocat
password: ${{secrets.MY_NPM_PASSWORD}} # Must be an unencoded password
replaces-base: true
registries:
npm-npmjs:
type: npm-registry
url: https://registry.npmjs.org
username: octocat
password: ${{secrets.MY_NPM_PASSWORD}} # Must be an unencoded password
replaces-base: true
registries:
npm-github:
type: npm-registry
url: https://npm.pkg.github.com
token: ${{secrets.MY_GITHUB_PERSONAL_TOKEN}}
replaces-base: true
registries:
npm-github:
type: npm-registry
url: https://npm.pkg.github.com
token: ${{secrets.MY_GITHUB_PERSONAL_TOKEN}}
replaces-base: true
For security reasons, Dependabot does not set environment variables. Yarn (v2 and later) requires that any accessed environment variables are set. When accessing environment variables in your .yarnrc.yml file, you should provide a fallback value such as ${ENV_VAR-fallback} or ${ENV_VAR:-fallback}. For more information, see Yarnrc files in the Yarn documentation.
nuget-feed
The nuget-feed type supports username and password, or token. 계정이 GitHub 계정인 경우 암호 대신 GitHub personal access token을(를) 사용할 수 있습니다.
nuget-feed doesn't support the replaces-base parameter.
registries:
nuget-example:
type: nuget-feed
url: https://nuget.example.com/v3/index.json
username: octocat@example.com
password: ${{secrets.MY_NUGET_PASSWORD}}
registries:
nuget-example:
type: nuget-feed
url: https://nuget.example.com/v3/index.json
username: octocat@example.com
password: ${{secrets.MY_NUGET_PASSWORD}}
registries:
nuget-azure-devops:
type: nuget-feed
url: https://pkgs.dev.azure.com/.../_packaging/My_Feed/nuget/v3/index.json
username: octocat@example.com
password: ${{secrets.MY_AZURE_DEVOPS_TOKEN}}
registries:
nuget-azure-devops:
type: nuget-feed
url: https://pkgs.dev.azure.com/.../_packaging/My_Feed/nuget/v3/index.json
username: octocat@example.com
password: ${{secrets.MY_AZURE_DEVOPS_TOKEN}}
pub-repository
The pub-repository type supports a URL and a token.
registries:
my-pub-registry:
type: pub-repository
url: https://example-private-pub-repo.dev/optional-path
token: ${{secrets.MY_PUB_TOKEN}}
updates:
- package-ecosystem: "pub"
directory: "/"
schedule:
interval: "weekly"
registries:
- my-pub-registry
registries:
my-pub-registry:
type: pub-repository
url: https://example-private-pub-repo.dev/optional-path
token: ${{secrets.MY_PUB_TOKEN}}
updates:
- package-ecosystem: "pub"
directory: "/"
schedule:
interval: "weekly"
registries:
- my-pub-registry
python-index
The python-index type supports username and password, or token. 계정이 GitHub 계정인 경우 암호 대신 GitHub personal access token을(를) 사용할 수 있습니다.
이 레지스트리 유형은 url 옵션에 제공된 경로와 접두사가 일치합니다. 즉, 동일한 호스트에 여러 자격 증명을 제공할 수 있으며, 이 자격 증명은 고유 경로에 액세스하는 데 사용할 수 있습니다. 그러나 동일한 호스트에 여러 레지스트리가 없는 경우 레지스트리의 모든 경로가 자격 증명을 받도록 url에서 경로를 생략하는 것이 좋습니다.
registries:
python-example:
type: python-index
url: https://example.com/_packaging/my-feed/pypi/example
username: octocat
password: ${{secrets.MY_BASIC_AUTH_PASSWORD}}
replaces-base: true
registries:
python-example:
type: python-index
url: https://example.com/_packaging/my-feed/pypi/example
username: octocat
password: ${{secrets.MY_BASIC_AUTH_PASSWORD}}
replaces-base: true
registries:
python-azure:
type: python-index
url: https://pkgs.dev.azure.com/octocat/_packaging/my-feed/pypi/example
username: octocat@example.com
password: ${{secrets.MY_AZURE_DEVOPS_TOKEN}}
replaces-base: true
registries:
python-azure:
type: python-index
url: https://pkgs.dev.azure.com/octocat/_packaging/my-feed/pypi/example
username: octocat@example.com
password: ${{secrets.MY_AZURE_DEVOPS_TOKEN}}
replaces-base: true
rubygems-server
The rubygems-server type supports username and password, or token. 계정이 GitHub 계정인 경우 암호 대신 GitHub personal access token을(를) 사용할 수 있습니다.
이 레지스트리 유형은 url 옵션에 제공된 경로와 접두사가 일치합니다. 즉, 동일한 호스트에 여러 자격 증명을 제공할 수 있으며, 이 자격 증명은 고유 경로에 액세스하는 데 사용할 수 있습니다. 그러나 동일한 호스트에 여러 레지스트리가 없는 경우 레지스트리의 모든 경로가 자격 증명을 받도록 url에서 경로를 생략하는 것이 좋습니다.
registries:
ruby-example:
type: rubygems-server
url: https://rubygems.example.com
username: octocat@example.com
password: ${{secrets.MY_RUBYGEMS_PASSWORD}}
replaces-base: true
registries:
ruby-example:
type: rubygems-server
url: https://rubygems.example.com
username: octocat@example.com
password: ${{secrets.MY_RUBYGEMS_PASSWORD}}
replaces-base: true
registries:
ruby-github:
type: rubygems-server
url: https://rubygems.pkg.github.com/octocat/github_api
token: ${{secrets.MY_GITHUB_PERSONAL_TOKEN}}
replaces-base: true
registries:
ruby-github:
type: rubygems-server
url: https://rubygems.pkg.github.com/octocat/github_api
token: ${{secrets.MY_GITHUB_PERSONAL_TOKEN}}
replaces-base: true
terraform-registry
The terraform-registry type supports a token.
registries:
terraform-example:
type: terraform-registry
url: https://terraform.example.com
token: ${{secrets.MY_TERRAFORM_API_TOKEN}}
registries:
terraform-example:
type: terraform-registry
url: https://terraform.example.com
token: ${{secrets.MY_TERRAFORM_API_TOKEN}}