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

Question: How do you force token acquisition #118

Closed
lukewis opened this issue Aug 17, 2019 · 2 comments
Closed

Question: How do you force token acquisition #118

lukewis opened this issue Aug 17, 2019 · 2 comments

Comments

@lukewis
Copy link

lukewis commented Aug 17, 2019

I just installed the credential provider via the helper script on macOS. I'm now trying to install a global tool from a private azure feed, but it's coming up with a package not found error. I suspect this is because I haven't yet acquired a token. The README says to run dotnet restore --interactive, but I don't have a project against which I can restore (since I'm trying to install a global tool). Is there another way to force it to acquire a token?

@apluche
Copy link
Contributor

apluche commented Aug 19, 2019

Hi,

Could you try running the credential provider dll directly with the -I (IsRetry) flag?

The .dll path is .nuget\plugins\netcore\CredentialProvider.Microsoft\CredentialProvider.Microsoft.dll

Here is an example of a command: .\CredentialProvider.Microsoft.dll -U -I

Running the command will let us know if you are able to get credentials and find out more about the problem.

This link might provide some useful information about the command.
Help

Please let me know what happens. I gladly help you figure out the issue!

@lukewis
Copy link
Author

lukewis commented Aug 20, 2019

Thanks for the tip @apluche ! That did in fact succeed in acquiring a token. I then learned that although I had run a nuget.exe command to add the private source, it did not alter my ~/.nuget/Nuget/Nuget.config file (not sure where nuget.exe stored that information). After I manually edited the user Nuget.config file to include my private feed, I was able to install the global tool. It's too bad that dotnet cli doesn't have a dotnet list packagesource or dotnet add packagesource commands. Thanks again for the tip!

@lukewis lukewis closed this as completed Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants