akka-aspire-configurat…
Configure Akka.NET with .NET Aspire for local development and production deployments. Covers actor system setup, clustering, persistence, Akka.Management…
Diagnose and fix .NET HTTPS dev certificate trust issues on Linux. Covers the full certificate lifecycle from generation to system CA bundle inclusion, with distro-specific guidance for Ubuntu, Fedora, Arch, and WSL2.
$ npx -y skills add aaronontheweb/dotnet-skills --skill dotnet-devcert-trust --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/dotnet-devcert-trustContext preview
The summary Claude sees to decide when to auto-load this skill.
Diagnose and fix .NET HTTPS dev certificate trust issues on Linux. Covers the full certificate lifecycle from generation to system CA bundle inclusion, with distro-specific guidance for Ubuntu, Fedora, Arch, and WSL2.
name: dotnet-devcert-trust description: Diagnose and fix .NET HTTPS dev certificate trust issues on Linux. Covers the full certificate lifecycle from generation to system CA bundle inclusion, with distro-specific guidance for Ubuntu, Fedora, Arch, and WSL2. invocable: false
Use this skill when:
On Windows and macOS, `dotnet dev-certs https --trust` handles everything automatically — it generates the certificate, installs it in the user store, and adds it to the system trust store. On Linux, **it does almost nothing useful**. The command generates the cert and places it in the user store, but:
1. It does **not** export the certificate to the system CA directory 2. It does **not** run `update-ca-certificates` to rebuild the CA bundle 3. It does **not** add the cert to browser trust stores (NSS/NSSDB) 4. The `--trust` flag silently succeeds but the cert remains untrusted
This means .NET applications, OpenSSL, curl, and browsers all reject the dev certificate — even though `dotnet dev-certs https --check` reports it exists.
Prior to Aspire 13.1.0, Redis connections used plaintext. Starting with 13.1.0, Aspire enables TLS on Redis by default. If your dev cert isn't trusted at the system level, Redis connections fail immediately with:
System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot
Understanding the architecture prevents cargo-cult debugging:
┌─────────────────────────────────────────────────────┐
│ Application (.NET, curl, OpenSSL) │
│ reads: /etc/ssl/certs/ca-certificates.crt │
│ (consolidated CA bundle) │
└──────────────────────┬──────────────────────────────┘
│ built by
┌──────────────────────▼──────────────────────────────┐
│ update-ca-certificates │
│ reads from: │
│ /usr/share/ca-certificates/ (distro CAs) │
│ /usr/local/share/ca-certificates/ (local CAs) │
│ writes to: │
│ /etc/ssl/certs/ca-certificates.crt (bundle) │
│ /etc/ssl/certs/*.pem (individual symlinks) │
└─────────────────────────────────────────────────────┘**Key insight:** Placing a `.crt` file in `/usr/local/share/ca-certificates/` is necessary but **not sufficient**. The consolidated bundle at `/etc/ssl/certs/ca-certificates.crt` must be rebuilt by running `update-ca-certificates`. Applications read the bundle, not the individual files.
Run these checks in order. Stop at the first FAIL and apply its fix before continuing.
dotnet dev-certs https --check echo "Exit code: $?"
| Exit Code | Meaning | Action | |-----------|---------|--------| | 0 | Cert exists in user store | PASS — continue | | Non-zero | No valid dev cert | Run `dotnet dev-certs https` |
ls -la /usr/local/share/ca-certificates/ | grep -iE 'dotnet|aspnet'
| Result | Meaning | |--------|---------| | Only `dotnet-dev-cert.crt` with `-rw-r--r--` (644) | PASS | | Multiple cert files, wrong permissions, or stale `aspnet*` files | FAIL |
**Common stale files from previous sessions:**
| File | Problem | |------|---------| | `aspnetcore-dev.crt` | Often created with `0600` permissions (unreadable by `update-ca-certificates`) | | `aspnet/https.crt` | Old convention, may have a different fingerprint than current dev cert | | `dotnet-dev-cert.crt` with `0600` | Correct name but wrong permissions |
**Fix:**
# Remove ALL stale cert files sudo rm -f /usr/local/share/ca-certificates/aspnetcore-dev.crt sudo rm -rf /usr/local/share/ca-certificates/aspnet/ # Ensure correct permissions on the dev cert (if it exists) sudo chmod 644 /usr/local/share/ca-certificates/dotnet-dev-cert.crt
This is the most commonly failed check. The cert file exists but was never added to the bundle.
openssl verify -CAfile /etc/ssl/certs/ca-certificates.crt \ /usr/local/share/ca-certificates/dotnet-dev-cert.crt
| Result | Meaning | |--------|---------| | `dotnet-dev-cert.crt: OK` | PASS — cert is in the consolidated bundle | | `error 20 at 0 depth lookup: unable to get local issuer certificate` | FAIL — bundle was never rebuilt | | `error 2 at 0 depth lookup: unable to get issuer certificate` | FAIL — same issue, different OpenSSL version |
**Fix:**
sudo update-ca-certificates # Expected output includes "1 added" or similar # Re-verify openssl verify -CAfile /etc/ssl/certs/ca-certificates.crt \ /usr/local/share/ca-certificates/dotnet-dev-cert.crt
SSL environment variables can redirect certificate lookups away from the system bundle:
echo "SSL_CERT_DIR=${SSL_CERT_DIR:-<unset>}"
echo "SSL_CERT_FILE=${SSL_CERT_FILE:-<unset>}"
echo "DOTNET_SSL_CERT_DIR=${DOTNET_SSL_CERT_DIR:-<unset>}"
echo "DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=${DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER:-<unset>}"| Result | Meaning | |--------|---------| | All `<unset>` | PASS | | Any variable set | FAIL — ma
A comprehensive AI coding plugin with 30 skills and 5 specialized agents for professional .NET development. Battle-tested patterns from production systems covering C#, Akka.NET, Aspire, EF Core, testing, and performance optimization.
Configure Akka.NET with .NET Aspire for local development and production deployments. Covers actor system setup, clustering, persistence, Akka.Management…
Critical Akka.NET best practices including EventStream vs DistributedPubSub, supervision strategies, error handling, Props vs DependencyResolver, work…
Patterns for building entity actors with Akka.Hosting - GenericChildPerEntityParent, message extractors, cluster sharding abstraction, akka-reminders, and…
Akka.Management for cluster bootstrapping, service discovery (Kubernetes, Azure, Config), health checks, and dynamic cluster formation without static seed…
Write unit and integration tests for Akka.NET actors using modern Akka.Hosting.TestKit patterns. Covers dependency injection, TestProbes, persistence testing,…
Guidelines for making .NET libraries and applications trimming-safe and Native AOT compatible. Covers the trimming/AOT model, the MSBuild properties that…