-
Notifications
You must be signed in to change notification settings - Fork 730
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Hello,
Without the variable USE_NET8_ARTIFACTS_CREDENTIAL_PROVIDER set to false, using the credprovider for old dotnet versions is likely to fail.
Dotnet 6 image build
Console output (azure pipelines)
##[error]#12 [build 3/6] RUN curl -sSL https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash
##[error]#12 0.270 INFO: Creating the nuget plugin directory (i.e. /root/.nuget/plugins).
##[error]#12 0.272 Downloading from https://github.com/Microsoft/artifacts-credprovider/releases/latest/download/Microsoft.Net8.NuGet.CredentialProvider.tar.gz
##[error]#12 0.611 tar: invalid magic
##[error]#12 0.611 tar: short read
##[error]#12 0.611 tar: plugins/netcore: not found in archive
##[error]#12 ERROR: process "/bin/bash -eo pipefail -c curl -sSL https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash" did not complete successfully: exit code: 1Docker image
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine3.16 AS build
# Install Bash
# hadolint ignore=DL3018
RUN set -eu \
&& apk add --no-cache --update bash curl
# Install Credential Provider and set env variables to enable Nuget restore with auth
ARG PAT
ARG NUGET_ENDPOINT="https://pkgs.dev.azure.com/xxx"
ARG \
USE_NET6_ARTIFACTS_CREDENTIAL_PROVIDER="false"
SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
# hadolint ignore=SC2016
RUN curl -sSL https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash
ENV NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED=true
ENV VSS_NUGET_EXTERNAL_FEED_ENDPOINTS='{"endpointCredentials": [{"endpoint":"'${NUGET_ENDPOINT}'", "password":"'${PAT}'"}]}'
Dotnet 3.1 image build
Console output (azure pipelines)
##[error]#13 [build 3/7] RUN curl -sSL https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash
##[error]#13 0.320 INFO: Creating the nuget plugin directory (i.e. /root/.nuget/plugins).
##[error]#13 0.322 Downloading from https://github.com/Microsoft/artifacts-credprovider/releases/latest/download/Microsoft.Net8.NuGet.CredentialProvider.tar.gz
##[error]#13 0.670 tar: invalid magic
##[error]#13 0.670 tar: short read
##[error]#13 0.671 tar: plugins/netcore: not found in archive
##[error]#13 ERROR: process "/bin/bash -eo pipefail -c curl -sSL https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash" did not complete successfully: exit code: 1
##[error]------
##[error] > [build 3/7] RUN curl -sSL https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash:
##[error]0.320 INFO: Creating the nuget plugin directory (i.e. /root/.nuget/plugins).
##[error]0.322 Downloading from https://github.com/Microsoft/artifacts-credprovider/releases/latest/download/Microsoft.Net8.NuGet.CredentialProvider.tar.gz
##[error]0.670 tar: invalid magic
##[error]0.670 tar: short read
##[error]0.671 tar: plugins/netcore: not found in archiveDockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine3.10 AS build
RUN set -eu \
&& apk add --no-cache --update bash~=5.0 curl~=7.66
# Install Credential Provider and set env variables to enable Nuget restore with auth
ARG PAT
ARG NUGET_ENDPOINT="https://pkgs.dev.azure.com/xxx"
ARG USE_NET6_ARTIFACTS_CREDENTIAL_PROVIDER="false"
SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
RUN curl -sSL https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash
ENV NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED true
ENV VSS_NUGET_EXTERNAL_FEED_ENDPOINTS '{"endpointCredentials": [{"endpoint":"'${NUGET_ENDPOINT}'", "password":"'${PAT}'"}]}'
The issue here is that the shortened URL https://aka.ms/install-artifacts-credprovider.sh is pointing to the master branch of this repo, which is currently an alpha version.
Maybe it would be possible to have a separate channel or a separate URL for alpha versions of the cred provider ?
Thanks !
chrisosb
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working