Search code examples
nugetjenkins-pipelineartifactory

Nuget login errors with Jenkins and Artifactory


Running into an issue with Nuget, Jenkins, and Artifactory. Can't seem to get the Jenkins pipeline to recognize the Nuget configuration

What is working:

  • login to artifactory with the account I'm trying to read with.
  • view the repository and artifacts I am trying to access.
  • use the nuget command line to access the repository and put in username and password when prompted.

Now when the same process is put in a Jenkins pipeline, I get the following:

"The remote server indicated that the previous request was forbidden. Please provide credentials for **https://host.domain/artifactory/api/nuget/v3/repo**"

Here is how I setup nuget:

nuget.exe sources Add -Name Artifactory -Source https://host.domain/artifactory/api/nuget/v3/repo -username <username> -password <password>

nuget.exe setapikey <username>:<password> -Source Artifactory

Even adding the two lines above result in the same error


Solution

  • In Artifactory repository button "Set Me Up". This is how to step by step.