我正在尝试使用“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)
我看到的问题是,无论我提供什么路径来导出证书,我都会收到相同的“访问路径被拒绝”错误。我错过了什么?我知道在很多地方都建议了这个命令。但我似乎无法让它发挥作用。
谢谢你。
导出路径应指定文件,而不是目录。这解决了我在 Mac 上的问题:
dotnet dev-certs https -v -ep ${HOME}/.aspnet/https/aspnetapp.pfx -p <password>
| 归档时间: |
|
| 查看次数: |
2718 次 |
| 最近记录: |