Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Credential plugin exited with error -1 / error downloading package when using credential providers with multiple sources #2885
I believe there's a bug with how exceptions are not handled after a credential provider invocation is cancelled, because the package was already successfully fetched from another package source. This results in an error that indicates the credential provider returned -1 (which it did because it was intentionally terminated by nuget).
I've reproed this in NuGet >=3.4, including latest nightly.
I haven't been able to repro this in 3.3 (when the credential provider system was introduced I believe), so something must have changed there between 3.3 and 3.4.
It can be somewhat consistently reproed with a configuration as simple as this:
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <clear /> <add key="zarenner" value="https://zarenner.pkgs.visualstudio.com/DefaultCollection/_packaging/feed2/nuget/v3/index.json" protocolVersion="3" /> <add key="zlrenner" value="https://zlrenner.pkgs.visualstudio.com/DefaultCollection/_packaging/feed1/nuget/v3/index.json" protocolVersion="3" /> </packageSources> </configuration>
<?xml version="1.0" encoding="utf-8"?> <packages> <package id="testpackage" version="1.0.0" /> </packages>