3개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
Try to update a source credentials for sourceName
nuget.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="sourceName" value="https://mydomain-01005003.d.codeartifact.eu-west-1.amazonaws.com/nuget/nugets/v3/index.json" />
</packageSources>
</configuration>
dotnet nuget update source sourceName
Dockerfile
FROM mcr.microsoft.com/dotnet/sdk:6.0
WORKDIR /app
COPY ./app .
COPY ./.aws /root/.aws
RUN apt-get update; apt-get install -y python3-pip curl unzip
RUN curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip \
&& unzip awscliv2.zip \
&& ./aws/install \
&& rm -rf aws awscliv2.zip
RUN \
CODEARTIFACT_AUTH_TOKEN=`aws codeartifact get-authorization-token --domain mydomain --domain-owner 01005003 --region eu-west-1 --query authorizationToken --output text --profile default` && \
dotnet nuget update source sourceName -s "https://mydomain-01005003.d.codeartifact.eu-west-1.amazonaws.com/nuget/nugets/v3/index.json" -u "aws" -p "${CODEARTIFACT_AUTH_TOKEN}" --store-password-in-clear-text --configfile "nuget.config"
RUN \
dotnet publish
답변함 일 년 전
Having this same issue -- did anyone find a solution?