artifacts-credprovider: dotnet restore --interactive does not work On prem
Environment
- Using Ubuntu 18.04.1 LTS (Bionic Beaver) on a Windows host.
- Connecting to a TFS 2017 Update 2 Server.
- Installed latest Nuget.exe, .Net Core v2.1.6 (SDK 2.1.500)
- Installed Microsoft.NuGet.CredentialProvider and verified content in
$HOME\.nuget\plugins
Issues
dotnet restore --interactive
does not promptdotnet restore
with nuget.config file containing PAT token throws exception
/usr/share/dotnet/sdk/2.1.500/NuGet.targets(114,5): error : Unable to load the service index for source https://[REDACTED]/nuget/v3/index.json. [REDACTED]
/usr/share/dotnet/sdk/2.1.500/NuGet.targets(114,5): error : GSSAPI operation failed with error - An invalid status code was supplied (Invalid value in argument). [REDACTED]
dotnet restore
without specifying PAT token in nuget.config throws exception
/usr/share/dotnet/sdk/2.1.500/NuGet.targets(114,5): error : Unable to load the service index for source https://REDACTED/nuget/v3/index.json. [REDACTED]
/usr/share/dotnet/sdk/2.1.500/NuGet.targets(114,5): error : GSSAPI operation failed with error - An invalid status code was supplied (SPNEGO cannot find mechanisms to negotiate). [REDACTED]
Please advise on any know issues / workaround to get a dotnet restore
working against a TFS private package feed.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 25 (5 by maintainers)
Just to add - we have just found that SDK v2.2.203 has broken the --interactive function (for Azure Devops hosted feeds, from Windows 10 machines). Reverted to v2.2.202 and it works.
Our investigation on the internal work item resulted that unfortunately, the way the interactive flow currently works in this cred provider, there is no way to make it work interactively for an on premise Azure DevOps Server instance. The best solution we currently have is to use the workaround of using the environment variables mentioned above. Sorry for the inconvenience.
To make it clearer, the newest version of this cred provider detects if the feed URI is an Azure DevOps Server on premise URI and won’t even try the interactive flow to avoid confusing logs.
As a follow-up work item, we should document this in the cred provider readme.
For anyone looking for a summarized solution, here’s what worked on a Mac setup:
generate a personal acess token (PAT) that gives you rights to the given service;
configure your
Nuget.config
to use the PAT for authentication usingBasic
auth as shown by stephan7878:clear the cache and restore the packages using the old HTTP client:
I suggest you create a new issue as this issue is specific to azure devops server, and has been closed.
Hello, for whos having this problem, maybe you can try this solution -> https://github.com/microsoft/artifacts-credprovider/issues/63
With release of 3.0 this is still NOT working for us. Nothing helps. Our whole Integration Test environment is halted due to this issue. I cannot make dotnet restore work on linux containers with our internal NuGet repository, no matter what. Please give me something. I don’t want to switch to Windows containers…
I am also experiencing issues with the provider, but I use it in a container. Here is the setup:
Docker image: mcr.microsoft.com/dotnet/core/sdk:3.0-bionic (same behavior with 2.2-bionic) Install provider in Dockerfile:
RUN bash /application/scripts/installcredprovider.sh
Pass Env Variable In Compose:Calling
dotnet restore
inside the container (with or without --interactive) always throws:Can anyone give me a hint how to fix this?
Closing this issue due to inactivity.