microsoft / microsoft/vcpkg

VCPKG binary caching fails to upload to Azure DevOps feed after interactive authentication

Open
#14,840 15 comments 0 reactions 3 assignees View on GitHub

@LilyWangLL is already working on this.

Since Feb 20, 2024.

category:vcpkg-bug
Dominant language
CMake
Stars
27.5k
Forks
7.7k
Avg merge
2d 19h
Merged PRs (30d)
321

Description

Describe the bug
Binary caching with nuget fails when attempting to upload package to Azure DevOps Artifacts feed.

Environment

  • OS: Windows 10
  • Compiler: MSVC 19.28.29334.0
  • VCPKG 2020.11-1

To Reproduce
Steps to reproduce the behavior:

  1. $env:VCPKG_BINARY_SOURCES='clear;nuget,https://pkgs.dev.azure.com/.../v3/index.json,readwrite;interactive'
  2. vcpkg install --triplet x64-windows-static --x-manifest-root C:\Temp\Test --debug
  3. See error
    Repro code when

Expected behavior
New nuget package should be uploaded to Azure DevOps artifact feed

Failure logs
Response status code does not indicate success: 400 (Bad Request - The request to the server did not include the header X-NuGet-ApiKey, but it is required even though credentials were provided. If using NuGet.exe, use the -ApiKey option to set this to an arbitrary value, for example "-ApiKey AzureDevOps"

The workaround provided in the comment below fixes the problem;

https://devblogs.microsoft.com/cppblog/vcpkg-accelerate-your-team-development-environment-with-binary-caching-and-manifests/#comment-1403

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.