Skip to content

dotnet restore interactive fails with private VSTS feed #7812

@ViktorHofer

Description

@ViktorHofer

Details about Problem

NuGet product used: dotnet.exe
dotnet.exe --version: 2.2.104
OS version: 10.0.18334

dotnet restore --interactive doesn't prompt for authentication and just returns 401:

 "C:\git\corefx\eng\common\internal\Tools.csproj" (Restore target) (1) ->
       (Restore target) ->
         C:\git\corefx\.dotnet\sdk\2.2.104\NuGet.targets(114,5): error : Failed to retrieve information about 'TestILC.x86ret' from remote source 'https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tool/FindPackagesById()?id='TestILC.x86ret'&semVerLevel=2.0.0'. [C:\git\corefx\eng\common\internal\Tools.csproj]
       C:\git\corefx\.dotnet\sdk\2.2.104\NuGet.targets(114,5): error :   Response status code does not indicate success: 401 (Unauthorized). [C:\git\corefx\eng\common\internal\Tools.csproj]

With nuget.exe 4.9.2.5706 the authentication dialog is prompted as expected:

nuget.exe restore "eng\common\internal\Tools.csproj" -Source https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tool

Please provide credentials for: https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tool
UserName:

Detailed repro steps so we can see the same problem

  1. git clone https://github.com/dotnet/corefx.git && cd corefx

  2. .\build -restore && ".dotnet\dotnet.exe" restore "eng\common\internal\Tools.csproj" --interactive --source https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tool

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions