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

Trusting the https certificate on Linux platforms fails with the error: "exporting the HTTPS developer certificate to a file." #58337

Closed
v-sherryfan opened this issue Oct 10, 2024 · 5 comments
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI

Comments

@v-sherryfan
Copy link

Describe the bug

To Reproduce

  1. Clean machine: Ubuntu 24.04 and Debian 12
  2. Install SDK 8.0.403 from download page
  3. According to documentation Ubuntu trust the certificate for service-to-service communication to trust https certificate, you will get an error when you running following code:
    dotnet dev-certs https
    sudo -E dotnet dev-certs https -ep /usr/local/share/ca-certificates/aspnet/https.crt --format PEM
    

Exceptions (if any)

There was an error exporting the HTTPS developer certificate to a file.
Image

Note

  • This issue will block Aspire Project from running
  • Image

Expected

Image

Further technical details

parallels@ubuntu-linux-22-04-02-desktop:~$ dotnet --info
.NET SDK:
Version: 8.0.403
Commit: c64aa40a71
Workload version: 8.0.400-manifests.58db758f
MSBuild version: 17.11.9+a69bbaaf5

Runtime Environment:
OS Name: ubuntu
OS Version: 22.04
OS Platform: Linux
RID: linux-x64
Base Path: /usr/lib/dotnet/sdk/8.0.403/

.NET workloads installed:
Configured to use loose manifests when installing new manifests.
[aspire]
Installation Source: SDK 8.0.400
Manifest Version: 8.2.1/8.0.100
Manifest Path: /usr/lib/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.aspire/8.2.1/WorkloadManifest.json
Install Type: FileBased

Host:
Version: 8.0.10
Architecture: x64
Commit: 81cabf2857

.NET SDKs installed:
8.0.110 [/usr/lib/dotnet/sdk]
8.0.403 [/usr/lib/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.10 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.10 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI label Oct 10, 2024
@v-sherryfan
Copy link
Author

@javiercn @mkArtakMSFT This issue blocked our aspire scenario, could you please take a look?

cc: / @balachir

@jinzhao1127
Copy link

Maybe you should use dotnet dev-certs https --verbose --trust to trust your certificate on Linux.

@PhilG0lding
Copy link

PhilG0lding commented Oct 10, 2024

We've just had a similar issue with multiple docker image builds failing using mcr.microsoft.com/dotnet/sdk:8.0-alpine. Vite was trying to generate dev-certs, which is where we encountered the issue.

Looks to be an issue in the latest SDK (8.0.403). We downgraded to SDK 8.0.402 (mcr.microsoft.com/dotnet/sdk:8.0.402-alpine3.20) our images build now works.

@martincostello
Copy link
Member

This might be a dupe of #58330.

@v-sherryfan
Copy link
Author

Maybe you should use dotnet dev-certs https --verbose --trust to trust your certificate on Linux.

This solution works fine for me, thanks for your help. Close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI
Projects
None yet
Development

No branches or pull requests

4 participants