Skip to content

Commit 2328787

Browse files
authored
Fix dependabot registries examples for maven-repositories with a token (#41630)
1 parent 849831d commit 2328787

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

content/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ You must provide the required settings for each configuration `type` that you sp
923923

924924
### `composer-repository`
925925

926-
The `composer-repository` type supports username and password.
926+
The `composer-repository` type supports username and password. {% data reusables.dependabot.password-definition %}
927927

928928
{% raw %}
929929

@@ -942,7 +942,7 @@ registries:
942942

943943
{% data variables.product.prodname_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](https://github.com/opencontainers/distribution-spec/blob/main/spec.md). {% data variables.product.prodname_dependabot %} supports authentication to private registries via a central token service or HTTP Basic Auth. For further details, see [Token Authentication Specification](https://docs.docker.com/registry/spec/auth/token/) in the Docker documentation and [Basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) on Wikipedia.
944944

945-
The `docker-registry` type supports username and password.
945+
The `docker-registry` type supports username and password. {% data reusables.dependabot.password-definition %}
946946
{% ifversion dependabot-private-registries %}
947947
{% raw %}
948948

@@ -1004,7 +1004,7 @@ registries:
10041004

10051005
### `git`
10061006

1007-
The `git` type supports username and password.
1007+
The `git` type supports username and password. {% data reusables.dependabot.password-definition %}
10081008

10091009
{% raw %}
10101010

@@ -1061,18 +1061,18 @@ registries:
10611061

10621062
### `maven-repository`
10631063

1064-
The `maven-repository` type supports username and password.
1064+
The `maven-repository` type supports username and password. {% data reusables.dependabot.password-definition %}
1065+
10651066
{% ifversion dependabot-private-registries %}
10661067
{% raw %}
10671068

10681069
```yaml
10691070
registries:
10701071
maven-artifactory:
10711072
type: maven-repository
1072-
url: https://artifactory.example.com
1073+
url: https://acme.jfrog.io/artifactory/my-maven-registry
10731074
username: octocat
10741075
password: ${{secrets.MY_ARTIFACTORY_PASSWORD}}
1075-
replaces-base: true
10761076
```
10771077

10781078
{% endraw %}
@@ -1083,7 +1083,7 @@ registries:
10831083
registries:
10841084
maven-artifactory:
10851085
type: maven-repository
1086-
url: https://artifactory.example.com
1086+
url: https://acme.jfrog.io/artifactory/my-maven-registry
10871087
username: octocat
10881088
password: ${{secrets.MY_ARTIFACTORY_PASSWORD}}
10891089
```
@@ -1092,7 +1092,7 @@ registries:
10921092

10931093
### `npm-registry`
10941094

1095-
The `npm-registry` type supports username and password, or token.
1095+
The `npm-registry` type supports username and password, or token. {% data reusables.dependabot.password-definition %}
10961096

10971097
When using username and password, your `.npmrc`'s auth token may contain a `base64` encoded `_password`; however, the password referenced in your {% data variables.product.prodname_dependabot %} configuration file must be the original (unencoded) password.
10981098

@@ -1159,7 +1159,7 @@ For security reasons, {% data variables.product.prodname_dependabot %} does not
11591159

11601160
### `nuget-feed`
11611161

1162-
The `nuget-feed` type supports username and password, or token.
1162+
The `nuget-feed` type supports username and password, or token. {% data reusables.dependabot.password-definition %}
11631163

11641164
{% raw %}
11651165

@@ -1189,7 +1189,7 @@ registries:
11891189

11901190
### `python-index`
11911191

1192-
The `python-index` type supports username and password, or token.
1192+
The `python-index` type supports username and password, or token. {% data reusables.dependabot.password-definition %}
11931193

11941194
{% raw %}
11951195

@@ -1221,7 +1221,7 @@ registries:
12211221

12221222
### `rubygems-server`
12231223

1224-
The `rubygems-server` type supports username and password, or token.
1224+
The `rubygems-server` type supports username and password, or token. {% data reusables.dependabot.password-definition %}
12251225

12261226
{% ifversion dependabot-private-registries %}
12271227
{% raw %}

data/reusables/dependabot/dependabot-updates-registries-options.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ You use the following options to specify access settings. Registry settings must
44
|:---|:---|
55
| `type` | Identifies the type of registry. See the full list of types below. |
66
| `url` | The URL to use to access the dependencies in this registry. The protocol is optional. If not specified, `https://` is assumed. {% data variables.product.prodname_dependabot %} adds or ignores trailing slashes as required. |
7-
| `username` | The username that {% data variables.product.prodname_dependabot %} uses to access the registry. |
8-
| `password` | A reference to a {% data variables.product.prodname_dependabot %} secret containing the password for the specified user. For more information, see "[AUTOTITLE](/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot#storing-credentials-for-dependabot-to-use)." |
7+
| `username` | The username that {% data variables.product.prodname_dependabot %} uses to access the registry.</br>`username` is the username or email address for the account. |
8+
| `password` | A reference to a {% data variables.product.prodname_dependabot %} secret containing the password for the specified user. For more information, see "[AUTOTITLE](/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot#storing-credentials-for-dependabot-to-use)."</br>`password` is the password for the account specified by the username. {% data reusables.dependabot.password-definition %} |
99
| `key` | A reference to a {% data variables.product.prodname_dependabot %} secret containing an access key for this registry. For more information, see "[AUTOTITLE](/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot#storing-credentials-for-dependabot-to-use)." |
10-
| `token` | A reference to a {% data variables.product.prodname_dependabot %} secret containing an access token for this registry. For more information, see "[AUTOTITLE](/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot#storing-credentials-for-dependabot-to-use)." |
10+
| `token` | A reference to a {% data variables.product.prodname_dependabot %} secret containing an access token for this registry. For more information, see "[AUTOTITLE](/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot#storing-credentials-for-dependabot-to-use)."</br>`token` is used to provide an access token for an external system and should not be used to provide a {% data variables.product.prodname_dotcom %} {% data variables.product.pat_generic %}. If you want to use a {% data variables.product.prodname_dotcom %} {% data variables.product.pat_generic %}, you should supply it as a password. |
1111
| `replaces-base` | For registries{% ifversion dependabot-private-registries %}, if the boolean value is `true`, {% data variables.product.prodname_dependabot %} will resolve dependencies by using the specified URL rather than the base URL of that specific ecosystem. For example, for registries{% endif %} with `type: python-index`, if the boolean value is `true`, pip resolves dependencies by using the specified URL rather than the base URL of the Python Package Index (by default `https://pypi.org/simple`). |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
If the account is a {% data variables.product.prodname_dotcom %} account, you can use a {% data variables.product.prodname_dotcom %} {% data variables.product.pat_generic %} in place of the password.

0 commit comments

Comments
 (0)