I've been banging my heard for days trying to restore packages from an Azure Devops Artifacts nuget feed in a YAML pipeline, but no luck. MSBuild and dotnet restore both just tell me:
warning : The plugin credential provider could not acquire credentials. ...
Warning : Unable to load the service index for source ...
I can't find any information on what the problem is or how to get it to work.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I could use some guidance on the same topic.
Hey people - I'll have some time to take a look at this early next week, as I'm traveling today. We are working on making our services work better (and easier) in YAML, so this will be a good exercise for us.
For reference, could you both post a sample of the YAML you're trying to use?
pool:
name: Hosted VS2017
demands: msbuild
steps:
task: DotNetCoreInstaller@0
displayName: 'Use .NET Core SDK Tool Installer'
inputs:
version: 2.2.105
task: DotNetCoreCLI@2
displayName: 'DotNet restore packages'
inputs:
command: restore
continueOnError: false
etc to build and publish
I found a workaround, but according to the docs, it should just work without this:
- task: NuGetCommand@2
displayName: 'Authenticate nuget feed'
inputs:
command: custom
arguments: sources update -Name "<feed-name>" -Username "vsts" -Password "$(System.AccessToken)" -StorePasswordInClearText -ConfigFile ./NuGet.Config
Hi everyone, this looks like a duplicate of #3884 so I'm going to close this in favor of that one.
Most helpful comment
I found a workaround, but according to the docs, it should just work without this: