无法在Mac上创建开发者证书 [英] Cannot create developer certificate on Mac

查看:347
本文介绍了无法在Mac上创建开发者证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这发生在一夜之间.昨天,我能够在.NET Core we应用程序上工作.现在,每次我尝试执行dotnet run时,我的cmd行中都会出现以下错误:

This happened overnight. Yesterday I was able to work on my .NET Core we application. Now every time I try to do a dotnet run I get the following error in my cmd line:

如您所见,我尝试运行建议的命令来创建开发人员证书,依次为dotnet dev-certs httpsdotnet dev-certs https --trust.同时运行它们,我得到

As you can see, I tried running the suggested commands to create a developer certificate which are dotnet dev-certs https and then dotnet dev-certs https --trust. Running both of them, I get

将HTTPS开发人员证书保存到当前用户个人证书存储区时出错.

There was an error saving the HTTPS developer certificate to the current user personal certificate store.

在运行这些命令之前,我在此页面上阅读,我有两个在我的钥匙串中竞争本地主机认证.因此,我进入钥匙串以删除其中之一无济于事.然后,我删除了其他想法,认为我可以以某种方式重新创建它.因此,我运行上面的命令.

Before I ran those commands, I read on this page that I had two competing localhost certifications in my Keychain. So I go in the keychain to delete one of them to no avail. I then delete the other thinking that I can recreate it somehow. Hence me running the commands above.

然后我发现对于dotnet dev-certs https [options]选项的大多数变体(在运行dotnet dev-certs https -h

I then found out that I get the same "There was an error saving the HTTPS..." error for most variations of the command dotnet dev-certs https [options] options (options can be found running dotnet dev-certs https -h

任何人都知道为什么我会收到此错误吗?我如何获得有关为何无法将其保存到证书存储"的更多信息?似乎我被拒绝访问某种文件夹.

Anyone know why I might be getting this error? How can I get more info as to why it's not able to save to the "certificate store"? It seems like I'm being denied access to some kind of folder.

推荐答案

好,所以我终于重新启动了计算机.当我在VS Code中运行dotnet run命令时,出现了一些提示,要求我输入密码,以允许钥匙串中的某些内容访问....某物.我应该截图了...我不好.当我输入密码时,我收到了同样的错误.我再次按照步骤通过在最初的问题中输入dotnet命令来创建开发人员认证.然后我第二次跑dotnet run和中提琴.可以.

Ok, so I finally just restarted my computer. When I ran the dotnet run command in VS Code, some prompt came up asking me for my password to allow something in keychain to get access to....something. I should taken a screenshot....my bad. When I put in my password, I received the same error. I, again, followed the steps to create a dev certification by entering the dotnet commands in the initial question. Then I ran dotnet run a second time and viola. It works.

不知道发生了什么.如果有人可以提供一些见识,那真是太棒了.

No idea what happened. If anyone can provide some insight then that would be awesome.

如果遇到相同的问题,请尝试重新启动计算机并按照提示进行操作.

If you're experiencing the same problem, then try restarting your computer and following those prompts.

这篇关于无法在Mac上创建开发者证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆