Skip to content

Commit 08e0b20

Browse files
Copilotjeffkl
andauthored
Update docs for NUGET_API_KEY and NUGET_SYMBOL_API_KEY environment variables
Agent-Logs-Url: https://github.com/NuGet/docs.microsoft.com-nuget/sessions/ab5b7eb7-9b23-477f-888e-eea632c180bb Co-authored-by: jeffkl <[email protected]>
1 parent d3f39bb commit 08e0b20

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

docs/reference/cli-reference/cli-ref-environment-variables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,6 @@ The list of properties documented in [NuGet pack and restore as MSBuild targets]
3838
| NUGET_CERT_REVOCATION_MODE | Determines how the revocation status check of the certificate used to sign a package, is performed when a signed package is installed or restored. When not set, defaults to `online`.| Possible values *online* (default), *offline*. Related to [NU3028](../errors-and-warnings/NU3028.md) |
3939
| NUGET_ENHANCED_MAX_NETWORK_TRY_COUNT | Configures the maximum number of times an HTTP connection should be retried when enhanced retries are enabled. | A number representing how many retries to perform, the default value is `6`. |
4040
| NUGET_ENHANCED_NETWORK_RETRY_DELAY_MILLISECONDS | Configures the amount of time to wait in milliseconds before retrying an HTTP connection when enhanced retries are enabled. | Number of millseconds to wait, the default value is `1000`. |
41+
| NUGET_API_KEY | Fallback API key used when pushing a package if no API key is provided via `--api-key` and no key is found in the config file. | Available in NuGet 7.6+, Visual Studio 2026 17.6+, or .NET SDK 10.0.300+. |
42+
| NUGET_SYMBOL_API_KEY | Fallback API key used when pushing a symbols package if no API key is provided via `--symbol-api-key` and no key is found in the config file. | Available in NuGet 7.6+, Visual Studio 2026 17.6+, or .NET SDK 10.0.300+. |
4143

docs/reference/cli-reference/cli-ref-push.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ where `<packagePath>` identifies the package to push to the server.
3333

3434
- **`-ApiKey`**
3535

36-
The API key for the target repository. If not present, the one specified in the config file is used.
36+
The API key for the target repository. If not present, the one specified in the config file is used. If not present in the config file, NuGet 7.6+, Visual Studio 2026 17.6+, or .NET SDK 10.0.300+ checks the `NUGET_API_KEY` environment variable.
3737

3838
- **`-ConfigFile`**
3939

@@ -77,7 +77,7 @@ where `<packagePath>` identifies the package to push to the server.
7777

7878
- **`-SymbolApiKey`**
7979

80-
*(3.5+)* Specifies the API key for the URL specified in `-SymbolSource`.
80+
*(3.5+)* Specifies the API key for the URL specified in `-SymbolSource`. If not present, NuGet 7.6+, Visual Studio 2026 17.6+, or .NET SDK 10.0.300+ checks the `NUGET_SYMBOL_API_KEY` environment variable.
8181

8282
- **`-Timeout`**
8383

0 commit comments

Comments
 (0)