Downloading with an Access Token
How to sign in to the NES registry to download NES for .NET 6 and .NET 8 from a browser, curl, PowerShell, NuGet, or Docker.
NES for .NET 6 and .NET 8 downloads from registry.nes.herodevs.com require a HeroDevs access token. This covers the installers, the .tar.gz archives, the NES NuGet feed, and the Docker images. The only exception is the public .NET 6.0.36 build on Try NES for .NET.
If you do not have an access token, contact support@herodevs.com. If you are evaluating NES for .NET 8 with a trial token from the HeroDevs Sales Team, it works exactly the same way. See Access Tokens for more on how tokens are issued.
Credentials
The registry reads the password and ignores the username.
| Field | Value |
|---|---|
| Username | Any value. These docs use your contact email. |
| Password | Your access token |
Enter the whole token. Do not add Bearer or any other prefix in a password field.
Browser
- Open the download link from the .NET 6.0.x or .NET 8.0.x page.
- Your browser shows a "Sign in" prompt for
registry.nes.herodevs.com. Enter your contact email as the username and your access token as the password. - Select Sign in.
The page does not change. The file goes straight to your downloads folder.
If the prompt comes back after you sign in, the token was rejected. Browsers remember the credentials you entered until every window is closed, so close the browser, or open a private window, before trying again.
curl
Send the token as a bearer token. Use --location, because the registry redirects to the file:
curl --fail --location \
--header "Authorization: Bearer <NES_ACCESS_TOKEN>" \
--remote-name \
https://registry.nes.herodevs.com/bin/nes/dotnet-aspnetcore/8.0.31/dotnet-hosting-8.0.31-win.exe
curl.exe ships with Windows 10 version 1803 and later and Windows Server 2019 and later. Command Prompt does not accept \ line continuations, so put the command on one line there:
curl --fail --location --header "Authorization: Bearer <NES_ACCESS_TOKEN>" --remote-name https://registry.nes.herodevs.com/bin/nes/dotnet-aspnetcore/8.0.31/dotnet-hosting-8.0.31-win.exe
PowerShell
PowerShell sends a browser-style user agent, so the registry expects basic authentication instead of a bearer token. Build the header from any username and your token:
$token = "<NES_ACCESS_TOKEN>"
$basic = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("nes:$token"))
Invoke-WebRequest -UseBasicParsing `
-Headers @{ Authorization = "Basic $basic" } `
-Uri "https://registry.nes.herodevs.com/bin/nes/dotnet-aspnetcore/8.0.31/dotnet-hosting-8.0.31-win.exe" `
-OutFile "dotnet-hosting-8.0.31-win.exe"
This works in Windows PowerShell 5.1 and PowerShell 7.
NuGet
The NES NuGet feed takes the token as the password in packageSourceCredentials:
<packageSourceCredentials>
<nesnet>
<add key="Username" value="artifactory" />
<add key="ClearTextPassword" value="<NES_ACCESS_TOKEN>" />
</nesnet>
</packageSourceCredentials>
The username is ignored here too. See Self-contained deployments for the full nuget.config.
Docker
Sign in once with docker login. Use your contact email as the username and paste your access token when Docker asks for the password:
docker login registry.nes.herodevs.com -u <your-contact-email>
In CI, pipe the token in instead:
echo "$NES_ACCESS_TOKEN" | docker login registry.nes.herodevs.com -u <your-contact-email> --password-stdin
Troubleshooting
If a download returns 401, or the browser keeps asking you to sign in:
- Check that you copied the whole token, with no leading or trailing spaces.
- Check that the token has not expired. Trial tokens expire on the date the HeroDevs Sales Team gave you.
- Check that your subscription covers the version you are downloading. Access is granted per product, so a .NET 6 subscription does not download .NET 8.
Do not send your full token to HeroDevs Support. Support identifies a token by its last 6 characters. If a token is exposed, contact support@herodevs.com to have it revoked and replaced.