Details about Problem
- dotnet --version
- dotnet
- NuGet
- MacOS Sierra
Steps to reproduce
- Create a private NuGet repository (in my case using AppVeyor)
- Add it as a source:
nuget sources add -Name xxx -Source https://ci.appveyor.com/nuget/xxx -Username xxx@xxxx.com -Password xxx
- Prove that it's possible to list packages:
Using credentials from config. UserName: xxx@xxx.com
my.nuget.package 1.0.1
4 Attempt to add the private NuGet package to a dotnet project using the CLI:
dotnet add package -s https://ci.appveyor.com/nuget/xxx my.nuget.package
Expected
For the command to add the NuGet package to the project.
Actual
Got a message saying that it couldn't authenticate.
Microsoft (R) Build Engine version 15.1.548.43366
Copyright (C) Microsoft Corporation. All rights reserved.
Writing /var/folders/v0/gv8rbbt9157g5599sh8qljpr0000gn/T/tmpz9doUg.tmp
info : Adding PackageReference for package 'my.nuget.package' into project '/Users/xxx/Documents/my.nuget.package/src/xxx/xxx.csproj'.
log : Restoring packages for /Users/xxx/Documents/xxx/src/xxxLibrary/xxx.csproj...
info : GET https://ci.appveyor.com/nuget/xxx/FindPackagesById()?id='my.nuget.package'
info : Unauthorized https://ci.appveyor.com/nuget/xxx/FindPackagesById()?id='my.nuget.package' 4042ms
log : Retrying 'FindPackagesByIdAsyncCore' for source 'https://ci.appveyor.com/nuget/xxx/FindPackagesById()?id='my.nuget.package''.
log : Response status code does not indicate success: 401 (Unauthorized).
info : GET https://ci.appveyor.com/nuget/xxx/FindPackagesById()?id='my.nuget.package'
info : Unauthorized https://ci.appveyor.com/nuget/xxx/FindPackagesById()?id='xxx' 997ms
log : Retrying 'FindPackagesByIdAsyncCore' for source 'https://ci.appveyor.com/nuget/xxx/FindPackagesById()?id='xxx'.
log : Response status code does not indicate success: 401 (Unauthorized).
info : GET https://ci.appveyor.com/nuget/xxx/FindPackagesById()?id='my.nuget.package'
info : Unauthorized https://ci.appveyor.com/nuget/xxx/FindPackagesById()?id='xxx' 1007ms
error: Failed to retrieve information about 'my.nuget.package' from remote source 'https://ci.appveyor.com/nuget/xxx/FindPackagesById()?id='my.nuget.package''.
error: Response status code does not indicate success: 401 (Unauthorized).
Details about Problem
Steps to reproduce
4 Attempt to add the private NuGet package to a dotnet project using the CLI:
Expected
For the command to add the NuGet package to the project.
Actual
Got a message saying that it couldn't authenticate.