From 39d549e60bbc8f9aac08c9fd6caa6dd5b8cde0c7 Mon Sep 17 00:00:00 2001 From: mischa Date: Wed, 7 Jun 2023 23:58:30 -0700 Subject: [PATCH] Add example for NuGet public and private registry (#37626) Co-authored-by: Sophie <29382425+sophietheking@users.noreply.github.com> --- ...-dependabot-access-to-public-registries.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/content/code-security/dependabot/working-with-dependabot/removing-dependabot-access-to-public-registries.md b/content/code-security/dependabot/working-with-dependabot/removing-dependabot-access-to-public-registries.md index fd9126ef84..fb57939f06 100644 --- a/content/code-security/dependabot/working-with-dependabot/removing-dependabot-access-to-public-registries.md +++ b/content/code-security/dependabot/working-with-dependabot/removing-dependabot-access-to-public-registries.md @@ -277,6 +277,27 @@ This is an example of adding key `nuget.org` as true to the `disabledPackageSour ``` +To configure {% data variables.product.prodname_dependabot %} to access both private _and_ public feeds, view the following `dependabot.yml` example which includes the configured `public` feed under `registries`: + +```yaml +version: 2 +registries: + nuget-example: + type: nuget-feed + url: https://nuget.example.com/v3/index.json + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + public: + type: nuget-feed + url: https://api.nuget.org/v3/index.json +updates: + - package-ecosystem: nuget + directory: "/" + registries: "*" + schedule: + interval: daily +``` + ## Python Pip, Pip-compile, Pipenv, and Poetry are the four package managers that the Python ecosystem currently supports.