Skip to content

[vcpkg] Fix uploading to Azure DevOps Artifacts#14952

Merged
BillyONeal merged 5 commits intomicrosoft:masterfrom
ras0219:dev/roschuma/nuget-apikey
Dec 8, 2020
Merged

[vcpkg] Fix uploading to Azure DevOps Artifacts#14952
BillyONeal merged 5 commits intomicrosoft:masterfrom
ras0219:dev/roschuma/nuget-apikey

Conversation

@ras0219
Copy link
Copy Markdown
Contributor

@ras0219 ras0219 commented Dec 5, 2020

Fixes regression caused by #14202.

While ADO Artifacts supports downloading without an ApiKey, it does not support uploading. This PR detects the error message emitted by NuGet when attempting to upload to ADO and retries with the given dummy ApiKey (AzureDevOps). Users using other servers can specify ApiKeys via the nugetconfig provider or the SetApiKey CLI command of nuget.exe.

As a drive by, the documentation on how to specify credentials for NuGet has been greatly expanded.

  • What does your PR fix?

Fixes #14304. Fixes #14840.

@thomas-t1 @photex I'd appreciate it if you could confirm that this change fixes your respective issues :)

@JackBoosY JackBoosY added category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:internal labels Dec 7, 2020
@BillyONeal BillyONeal merged commit acb6b10 into microsoft:master Dec 8, 2020
@BillyONeal
Copy link
Copy Markdown
Member

Thanks for your contribution!

strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
@jeff-kohn
Copy link
Copy Markdown

It looks like this is broken again. Looking at the changes in this PR, it seems to be looking for the text "for example "-ApiKey AzureDevOps"" to determine when to insert the dummy key. But apparently, this has changed on the Azure Artifacts side, and the actual error you get back in this case doesn't contain that text. It instead says "No API Key was provided and no API Key could be found for..."

@JackBoosY
Copy link
Copy Markdown
Contributor

@jeffkohn-swi Can you please open a new issue to report that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VCPKG binary caching fails to upload to Azure DevOps feed after interactive authentication vcpkg nuget binary caching troubles on Ubuntu 18.04 (WSL)

6 participants