Skip to content

Commit a713ff1

Browse files
alhssmchammer01
andauthored
Add Dependabot goproxy-server private registry docs (#57407)
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
1 parent c497322 commit a713ff1

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

content/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ Examples of how to configure access to the private registries supported by {% da
165165
* [`composer-repository`](#composer-repository)
166166
* [`docker-registry`](#docker-registry)
167167
* [`git`](#git)
168+
* [`goproxy-server`](#goproxy-server)
168169
* [`hex-organization`](#hex-organization)
169170
* [`hex-repository`](#hex-repository)
170171
* [`maven-repository`](#maven-repository)
@@ -257,6 +258,25 @@ registries:
257258

258259
{% endraw %}
259260

261+
### `goproxy-server`
262+
263+
The `goproxy-server` type supports username and password. {% data reusables.dependabot.password-definition %}
264+
265+
{% data reusables.dependabot.dependabot-updates-path-match %}
266+
267+
{% raw %}
268+
269+
```yaml copy
270+
registries:
271+
my-private-registry:
272+
type: goproxy-server
273+
url: https://acme.jfrog.io/artifactory/api/go/my-repo
274+
username: octocat
275+
password: ${{secrets.MY_GO_REGISTRY_TOKEN}}
276+
```
277+
278+
{% endraw %}
279+
260280
{% ifversion dependabot-helm-support %}
261281

262282
### `helm-registry`

content/code-security/dependabot/working-with-dependabot/guidance-for-the-configuration-of-private-registries-for-dependabot.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ You'll find detailed guidance for the setup of the following package managers:
3434
* [Cargo](#cargo)
3535
* [Docker](#docker){% ifversion dependabot-docker-compose-support %}
3636
* [Docker Compose](#docker-compose){% endif %}
37+
* [Go](#go)
3738
* [Gradle](#gradle){% ifversion dependabot-helm-support %}
3839
* [Helm Charts](#helm-charts){% endif %}
3940
* [Maven](#maven)
@@ -238,6 +239,41 @@ updates:
238239

239240
{% data reusables.dependabot.dependency-submission-api-build-time-dependencies %}
240241

242+
### Go
243+
244+
Supported by Jfrog Artifactory and Nexus.
245+
246+
Go supports using a username and password for private registries.
247+
248+
Configure your private registry using the `dependabot.yml` file with the `goproxy-server` type:
249+
250+
{% raw %}
251+
252+
```yaml copy
253+
registries:
254+
my-private-registry:
255+
type: goproxy-server
256+
url: https://acme.jfrog.io/artifactory/api/go/my-repo
257+
username: octocat
258+
password: ${{secrets.MY_GO_REGISTRY_TOKEN}}
259+
```
260+
261+
{% endraw %}
262+
263+
You can also optionally configure how the Go toolchain accesses your proxy server by creating a `go.env` file in your repository root. This file allows you to set environment variables like `GOPROXY`, `GOPRIVATE`, `GONOSUMDB`, and `GOSUMDB` to control how Go modules are resolved:
264+
265+
```text copy
266+
GOPROXY=https://acme.jfrog.io/artifactory/api/go/my-repo
267+
GOPRIVATE=my-company.com/*
268+
GONOSUMDB=my-company.com/*
269+
```
270+
271+
#### Notes
272+
273+
{% data reusables.dependabot.access-private-dependencies-link %}
274+
275+
This feature enables unified dependency management for both public and private Go modules within a single {% data variables.product.prodname_dependabot %} workflow, making it ideal for organizations using corporate artifact management systems like JFrog Artifactory or Nexus.
276+
241277
### Maven
242278

243279
Maven supports username and password authentication. For more information, see `maven-repository` in [AUTOTITLE](/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot#maven-repository).

0 commit comments

Comments
 (0)