Code Monkey home page Code Monkey logo

Comments (9)

satbai avatar satbai commented on July 24, 2024 1

If you're using the NUGET_PLUGIN_PATHS variable, please make sure that it points to the .exe with NuGet or .dll with dotnet instead of the folder. For example, NUGET_PLUGIN_PATHS="C:\path-to-cred-provider\CredentialProvider.Microsoft.dll". Also, instead of using the environment variable, you can use the script to install the cred provider to the location that NuGet and dotnet knows to look for the plugin.

However, please let us know if you're using the pipeline tasks mentioned above - in that case I'll have to look into the task you're using.

from artifacts-credprovider.

danielwertheim avatar danielwertheim commented on July 24, 2024 1

@satbai I'm a bit embarrassed as I forgot to restart. Made a PR #61

from artifacts-credprovider.

zjrunner avatar zjrunner commented on July 24, 2024

Is your self-hosted agent an Azure Devops Pipelines agent? I'm trying to understand if you're running in Pipelines, but just using a manual script to restore instead of the existing pipeline tasks, or if you're trying to run in a separate CI/CD ecosystem entirely. Also, you've read the readme howto and are meeting the minver for dotnet in your environment correct? And your external feed endpoints json matches your nuget.config endpoint exactly?

from artifacts-credprovider.

danielwertheim avatar danielwertheim commented on July 24, 2024

@zjrunner Using Azure DevOps:

  • Repo
  • Pipeline
  • Artifacts feed

Using a devops pipeline agent. Everything works, except authentication against the Azure DevOps artifacts feed when it comes to restoring via dotnet build in the build script (CakeBuild in via Powershell task).

from artifacts-credprovider.

satbai avatar satbai commented on July 24, 2024

We recommend doing dotnet restore as a separate step before you do dotnet build to make it easier to trouble shoot. If dotnet restore still fails after changing the NUGET_PLUGIN_PATHS variable to point to the .dll and verifying you're using dotnet version 2.1.400 or greater, please run it with detailed verbosity and share the logs so we can investigate further.

from artifacts-credprovider.

danielwertheim avatar danielwertheim commented on July 24, 2024

@satbai it works now, but I'm not sure if it can be to due the fact that something is cached after I got it to work with a plain dotnet restore task (as in not in the build script)

I did clear the generated temp-nuget.config files etc and tried with my script after adjusting the NUGET_PLUGINS_PATH to point to the dll and then it worked.

from artifacts-credprovider.

satbai avatar satbai commented on July 24, 2024

Great! To rule out cache, you can check your session token cache location, remove the possible existing cache and try again.

from artifacts-credprovider.

danielwertheim avatar danielwertheim commented on July 24, 2024

@satbai unfortunately I was wrong... Tried running with diagnostics and debug (just dotnet restore) and still get:

"Unable to load the service index for source https://......"

"Response status code does not indicate success: 401 (Unauthorized)"

Running the build script it on the server manually works fine, and I have never provided any credentials there (via interactive or similar)

from artifacts-credprovider.

satbai avatar satbai commented on July 24, 2024

Could you share the error logs? Please don't share any secrets from the logs, however. With verbose logging you should be able to see if dotnet found the plugin and if it did, if the plugin found the credentials from the variable VSS_NUGET_EXTERNAL_FEED_ENDPOINTS. Also please make sure that the PAT that you add to the json is created in the correct Azure DevOps account.

from artifacts-credprovider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.