我无法从 GitHub 操作中向 AWS CodeArtifact 进行身份验证。AWS 响应始终为 401。
我正在执行以下步骤:
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- run: aws configure --profile my-custom-profile set region ${{ secrets.AWS_REGION }}
- run: aws configure --profile my-custom-profile set role_arn ${{ secrets.AWS_ARN }}
- run: aws configure --profile my-custom-profile set source_profile default
- run: dotnet tool install -g AWS.CodeArtifact.NuGet.CredentialProvider
- run: dotnet codeartifact-creds install
- run: dotnet codeartifact-creds configure set profile my-custom-profile
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
- name: Restore dependencies
run: dotnet restore
它一直在线上死去dotnet restore
:
谁能建议我错误地执行了哪些步骤 - 或者 - 丢失了?
旁注:在这之前,花了一些时间,但我最终还是让它在我的 localhost Windows 开发机器上运行。因此,我存档的凭据似乎有效。