dotnet run当我在 Windows 上本地运行 ( ) .NetCore 应用程序时,我遇到了 HTTPS 问题。\n它一直工作到我的本地主机证书过期\xe2\x80\xa6
我清理旧证书并生成新证书
\n\ndotnet dev-certs https \xe2\x80\x93clean\ndotnet dev-certs https \xe2\x80\x93trust\nRun Code Online (Sandbox Code Playgroud)\n\n我\xe2\x80\x99已经验证所有内容都已添加到certmgr(个人和受信任的证书)中,但我有同样的问题。\n它一直在尝试使用已过期的旧证书。\n我不知道它为什么要尝试清理 certs\xe2\x80\xa6 后使用旧的 \xe2\x80\x9clocalhost\xe2\x80\x9d 证书
\n\n你知道我应该做什么吗?
\n\n谢谢\nB\xc5\x82a\xc5\xbcej
\n我正在尝试使用“dotnet dev-certs”工具导出 https 证书以包含在 Docker 映像中。现在我正在使用:
dotnet dev-certs https -v -ep $(HOME)\.aspnet\https -p <password>
Run Code Online (Sandbox Code Playgroud)
我得到错误:
Exporting the certificate including the private key.
Writing exported certificate to path 'xxx\.aspnet\https'.
Failed writing the certificate to the target path
Exception message: Access to the path 'xxx\.aspnet\https' is denied.
An error ocurred exporting the certificate.
Exception message: Access to the path 'xxx\.aspnet\https' is denied.
There was an error exporting HTTPS developer certificate to a file.
Run Code Online (Sandbox Code Playgroud)
我看到的问题是,无论我提供什么路径来导出证书,我都会收到相同的“访问路径被拒绝”错误。我错过了什么?我知道在很多地方都建议了这个命令。但我似乎无法让它发挥作用。
谢谢你。
我想使用 运行我的 API dotnet run,所以我可以针对它运行一些测试。但是,在 Azure Pipelines 和 AppVeyor 上,它们没有安装开发人员证书,当我尝试启动 API 时出现错误。安装开发人员证书涉及运行:
dotnet dev-certs https --trust
Run Code Online (Sandbox Code Playgroud)
但是,这会显示一个用户必须单击的对话框,这将导致构建失败。如何在 CI 服务器上安装开发者证书?
.net certificate dotnet-cli azure-pipelines dotnet-dev-certs