Skip to content

nugetconfig binary source ignores API key in config file #12984

@kelseyfrancis

Description

@kelseyfrancis

Is your feature request related to a problem? Please describe.
For nugetconfig binary caching sources, vcpkg passes -ApiKey AzureDevOps as an option to the nuget push command, which overrides the API key specified in the nuget config file. This prevents pushing to corporate nuget repositories that require specific credentials.

Proposed solution
Remove -ApiKey AzureDevOps from the nuget push command for nugetconfig sources, or provide a vcpkg flag that causes it to be left off or overwritten with the real API key.

Describe alternatives you've considered
Add a write-only nuget binary source pointing at a temporary local directory, and then, after running vcpkg install, run a separate nuget command manually without the -ApiKey flag. This has at least a few disadvantages: more complicated config for separate read and write sources, requiring an extra step to upload and then cleanup files vs. it happening automatically, and not being able to rely on the copy of nuget vcpkg downloads for itself to use.

Metadata

Metadata

Assignees

Labels

category:vcpkg-featureThe issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions