Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credential provider support for dotnet.exe (cross-plat) #5447

Closed
livarcocc opened this issue Jun 19, 2017 · 7 comments
Closed

Credential provider support for dotnet.exe (cross-plat) #5447

livarcocc opened this issue Jun 19, 2017 · 7 comments
Labels
Area:Authentication Priority:2 Issues for the current backlog. Type:DCR Design Change Request
Milestone

Comments

@livarcocc
Copy link

From @craigb on June 17, 2017 0:44

Steps to reproduce

  1. Install the VSO nuget credential provider
  2. Take a dependency on a VSO nuget package feed
  3. dotnet restore

Expected behavior

I would expect it to auth and retrieve information about packages just like nuget.exe restore.

CredentialProvider.VSS: Getting new credentials for source: ...
Installing ...

Actual behavior

C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error : Failed to retrieve information... 
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error :   Response status code does not indicate success: 401 (Unauthorized).

Environment data

nuget help:
NuGet Version: 4.1.0.2450

dotnet --info output:
.NET Command Line Tools (1.0.4)

Product Information:
Version: 1.0.4
Commit SHA-1 hash: af1e6684fd

Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.4

Copied from original issue: dotnet/cli#6916

@anangaur
Copy link
Member

This was never supported. Refer to documentation: https://www.visualstudio.com/en-us/docs/package/nuget/nuget-exe

Unfortunately, to make use of authenticated feed on VSTS with dotnet.exe, the only option today is to specify a Personal Access Token in plain text as documented here: https://www.visualstudio.com/en-us/docs/package/nuget/dotnet-exe

It does makes sense however to have a mechanism to make this scenario work with dotnet.exe.

@rhythmnewt
Copy link

Adding this support will help greatly those using dotnet CLI.

@dennisroche
Copy link

dennisroche commented Apr 30, 2018

It appears Credential Providers are working for dotnet restore however still failing on dotnet new --install TemplatePackage.

C:\Program Files\dotnet\sdk\2.1.300-preview2-008533\NuGet.targets(114,5): error :   Response status code does not indicate success: 401 (Unauthorized). [C:\Users\Dennis\.templateengine\dotnetcli\v2.1.300-preview2-008533\scratch\restore.csproj]

Environment:

nuget
NuGet Version: 4.7.0.5104

dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.300-preview2-008533
 Commit:    996eb6c92c

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17133
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.300-preview2-008533\

Host (useful for support):
  Version: 2.1.0-preview2-26406-04
  Commit:  6833f3026b

@infin8x
Copy link

infin8x commented Apr 30, 2018

I suspect you've got a credential stashed somewhere on disk already, or the packages are already cached. We're working right now to bring cross-plat credential provider support to dotnet, but it hasn't shipped yet.

@anangaur
Copy link
Member

Duplicate of #6486. @livarcocc Can we close this one?

@livarcocc
Copy link
Author

Sounds good to me.

@anangaur anangaur closed this as completed May 1, 2018
@dennisroche
Copy link

dennisroche commented May 1, 2018

@alexmullans i had the packages cached. i cleared my nuget locals all -clear and dotnet restore failed as you said.

thanks for tracking this; #6486 will be very welcomed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Authentication Priority:2 Issues for the current backlog. Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

6 participants