How to set up CI build with license feed #136
-
Hi, What's the recommended way to set up CI build using Ignite licensed feed? Here blazor - general-nuget-feed it instructs to provide user and password. If instead I try to get an API key from here: and then I use: nuget sources add -name "Infragistics" -source "https://packages.infragistics.com/nuget/licensed" -username "pmoler@..." -password "api:4e...." but I get this error when installing/restoring Ignite package:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The usage was quite close, but indeed not the intended one and the documentation can use updates to explain better how to use the token. Background: Outside of using a specific credential provider, NuGet doesn't really have a concept of authentication tokens (not to be confused with API keys which are for publish only). In fact, the docs for Consuming packages from authenticated feeds mention at the start it's quite typical to use token as NuGet's password and you have figured out as much. That translates to the following in your case: nuget sources add -name "Infragistics" -source "https://packages.infragistics.com/nuget/licensed/" -username "api" -password "4e...." Can also suggest a working snippet for GitHub Actions: steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Authenticate
run: dotnet nuget add source https://packages.infragistics.com/nuget/licensed/ -n Infragistics -u api -p "${NUGET_AUTH_TOKEN}" --store-password-in-clear-text
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_AUTH_TOKEN }}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal That's assuming the password portion of the token is stored in GitHub Actions secrets and you've already applied the token as secret (that's no longer editable) you can easily trim the static username like so I believe Azure DevOps Pipelines actually also had some neater provider integration that can be utilized, but like I said need to flesh out the docs more. |
Beta Was this translation helpful? Give feedback.
The usage was quite close, but indeed not the intended one and the documentation can use updates to explain better how to use the token.
Background: Outside of using a specific credential provider, NuGet doesn't really have a concept of authentication tokens (not to be confused with API keys which are for publish only). In fact, the docs for Consuming packages from authenticated feeds mention at the start it's quite typical to use token as NuGet's password and you have figured out as much.
The Basic authentication-style (ID and password joined by a single colon
:
) however is not really immediately obvious. So in essence, what you have is user nameapi
paired with token4e...
and that's tr…