Skip to content
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

Proxy authentication for nuget does not work since dotnet 8 #9816

Open
heiner-suter opened this issue Mar 20, 2025 · 0 comments
Open

Proxy authentication for nuget does not work since dotnet 8 #9816

heiner-suter opened this issue Mar 20, 2025 · 0 comments

Comments

@heiner-suter
Copy link

heiner-suter commented Mar 20, 2025

Since we switched from dotnet 6 to dotnet 8, we cannot execute dotnet restore anymore. Authentication at the proxy to reach nuget does not work. With the dotnet 7 image it is working as well. Using dotnet 9, the script failes.

We build our application in GitLab using the image mcr.microsoft.com/dotnet/sdk:8.0 or version 6.0 (working).

The simplified build script looks as follows:

  script:
    - export http_proxy=${BUILD_PROXY} # lower case for apt
    - export https_proxy=${BUILD_PROXY}
    - apt update
    - apt install gss-ntlmssp -y
    - export HTTP_PROXY=${BUILD_PROXY} # upper case for nuget
    - export HTTPS_PROXY=${BUILD_PROXY}
    - echo "export http_proxy=${BUILD_PROXY}"
    - dotnet add src/Test/Test.csproj package Newtonsoft.Json

(we call dotnet add as it gives a more detailed error message than dotnet restore)

The Build_PROXY looks like this: http://proxy-user:[MASKED]@proxy-dev.loc:8080

This is the output of the command:

  Determining projects to restore...
  Writing /tmp/tmpsFfHsE.tmp
info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/8.0.407/trustedroots/codesignctl.pem'.
info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/8.0.407/trustedroots/timestampctl.pem'.
info : Adding PackageReference for package 'Newtonsoft.Json' into project 'src/Test/Test.csproj'.
error: Unable to load the service index for source https://api.nuget.org/v3/index.json.
error:   The proxy tunnel request to proxy 'http://proxy-dev.loc:8080/' failed with status code '407'."
@heiner-suter heiner-suter changed the title Authentication at proxy for nuget not working since dotnet 8 Proxy authentication for nuget does not work since dotnet 8 Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant