New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use SSO Profiles when running dotnet restore
#356
Comments
Hi @gwin003 , this repo is related to the AWS Toolkit, which has a CodeArtifact handler. If you have the AWS Toolkit installed, and have configured the CodeArtifact profile to use, are you able to restore and build your projects from Visual Studio? This should prompt you to perform the SSO login flow. To get things working from the command line, you will want to check out https://docs.aws.amazon.com/codeartifact/latest/ug/nuget-cli.html |
Hey @awschristou, sorry about that. Been bouncing around quite a few github repos today. Is there a better place to post this question? Anyways I've been living on that page you linked without any success. Here's the steps I took... dotnet tool uninstall -g AWS.CodeArtifact.NuGet.CredentialProvider
dotnet tool install -g AWS.CodeArtifact.NuGet.CredentialProvider`
dotnet codeartifact-creds install
aws sso login
aws s3api list-buckets --query "Buckets[].Name" --profile profile1 #this works
aws s3api list-buckets --query "Buckets[].Name" --profile profile2 #this also works
dotnet restore --no-cache #this throws the above error I do have the toolkit installed, but I typically use VS Code. I launched Visual Studio and attempted to use the toolkit but it keeps asking for Proxy Authentication to a single AWS Account (not the SSO provider). |
@detam-amazon can you advise on a suitable repo for getting help with the CodeArtifact Credential provider? |
I'm experiencing the same issue. Even when configuring the SSO as the default AWS profile, always get the same error. Did you get it to work @gwin003 ? |
We are migrating from local AWS profiles using access keys and secret keys to IAM Identity Center credentials using SSO. We have our credentials file working, and running commands like
aws s3api list-buckets --query "Buckets[].Name" --profile profile1
are working correctly.But I am unable to install nuget packages from CodeArtifact using the SSO profiles. Typically we would run
dotnet restore --no-cache
to update our packages, but running this now results in the following error.error NU1301: Unable to load the service index for source https://{account}.d.codeartifact.us-east-1. amazonaws.com/nuget/{accountName}/v3/index.json.
#200 mentions that SSO profiles are supported, so I'm sure I'm using it wrong. Can anyone point me in the correct direction? TIA
The text was updated successfully, but these errors were encountered: