Enable the CodeArtifact credential provider for nuget in Rider

245 Views Asked by At

I've configured my credential provider and it works fine with nuget and dotnet cli. (instructions used https://docs.aws.amazon.com/codeartifact/latest/ug/nuget-cli.html#nuget-configure-cli)

I've enabled nuget credential providers in Rider. (under settings -> Build/Execution/Deployment)

I'm using aws sso login and have my profile setup correctly (I think? Maybe Rider is different?)

When I try to do a nuget restore I get prompted for a username/password for my CodeArtifact source. How do I get the credential provider working?

Using Rider 2023.2.1 on MacOS.

1

There are 1 best solutions below

0
On

Try the following...

  1. In your zsh. Set the NUGET_PLUGIN_PATHS to $HOME/.nuget/plugins/netcore/AWS.CodeArtifact.NuGetCredentialProvider/AWS.CodeArtifact.NuGetCredentialProvider.dll (or relevant path)
  2. In the Rider settings --> NuGet --> Credential Providers. Set the "Use credentials provider" to "NuGet/.NET CLI plugins"
  3. In the Rider settings --> NuGet --> Restore. Set the "PackageReferenece Restore Engine" to "Console"

Hope this helps.