https://pulumi.com logo
Title
f

fresh-lifeguard-12682

07/29/2020, 12:32 AM
Has anyone experience a 401 nuget error when running Pulumi on Azure Pipelines when your NuGet.config has an internal/private nuget source?
n

nutritious-judge-27316

08/20/2020, 12:57 PM
How did you fix this? Can't seem to be able to do a pulumi up, works fine in local with the creds manager. but when on pipeline it can't seem to be able to authenicate.
f

fresh-lifeguard-12682

08/20/2020, 6:26 PM
If you are using private feeds, make sure you do NuGet Authenticate.
- task: NuGetAuthenticate@0
  displayName: 'Authenticate'
n

nutritious-judge-27316

08/20/2020, 7:47 PM
annoying still not work, thanks
f

fresh-lifeguard-12682

08/20/2020, 8:11 PM
would you share the error?
We were able to set this up on ADO.
Let me know how I can help!
n

nutritious-judge-27316

08/20/2020, 8:48 PM
used your example yaml and made sure build service has permission to access azure artifacts
f

fresh-lifeguard-12682

08/21/2020, 5:59 AM
you are doing that before the restore right?
do the restore right after that
steps:          
      - task: NuGetAuthenticate@0
        displayName: 'Authenticate'
        
      - task: DotNetCoreCLI@2
        displayName: 'Restore'
        inputs:
          command: restore
          projects: ${{ parameters.pathToSolution }}
          feedsToUse: config
          nugetConfigPath: ${{ parameters.directory }}/NuGet.config
          workingDirectory: ${{ parameters.directory }}
          
      - task: DotNetCoreCLI@2
        displayName: 'Build'
        inputs:
          projects: ${{ parameters.pathToSolution }}
          arguments: '--configuration ${{ parameters.buildConfiguration }}'
          workingDirectory: ${{ parameters.directory }}