We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description: When NuGet.Config contains a package source that matches source-url, automatically auth that source correctly.
NuGet.Config
source-url
Justification: Currently a user may have the following step in their Action:
- uses: actions/setup-dotnet@v4 with: dotnet-version: 8.x.x source-url: https://nuget.pkg.github.com/example/index.json env: NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
And a NuGet.Config with the following:
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> <add key="github" value="https://nuget.pkg.github.com/example/index.json" /> </packageSources> <packageSourceMapping> <packageSource key="nuget.org"> <package pattern="*" /> </packageSource> <packageSource key="github"> <package pattern="Example.*" /> </packageSource> </packageSourceMapping> </configuration>
Nuget restore will fail with authorization errors, which is unexpected since they provided a source-url and NUGET_AUTH_TOKEN.
NUGET_AUTH_TOKEN
They have to manually auth the mapping:
- name: dotnet run: dotnet ... env: NuGetPackageSourceCredentials_github: Username=${{ github.actor }};Password=${{ secrets.GITHUB_TOKEN }}
The setup-dotnet should automatically fixup the auth for mappings that match the provided source-url
setup-dotnet
The text was updated successfully, but these errors were encountered:
Hi @CoenraadS 👋, Thank you for the feature request. We'll investigate it and come back to you with the details!
Sorry, something went wrong.
No branches or pull requests
Description:
When
NuGet.Config
contains a package source that matchessource-url
, automatically auth that source correctly.Justification:
Currently a user may have the following step in their Action:
And a
NuGet.Config
with the following:Nuget restore will fail with authorization errors, which is unexpected since they provided a
source-url
andNUGET_AUTH_TOKEN
.They have to manually auth the mapping:
The
setup-dotnet
should automatically fixup the auth for mappings that match the providedsource-url
The text was updated successfully, but these errors were encountered: