1

I receive the following error when I try to install the dev-cert in the new SharePoint framework development model.

Has anyone seen this before or know what might be causing this error on my PC?

PS C:\MyDev\helloworld-webpart> gulp trust-dev-cert
Build target: DEBUG
[09:26:04] Using gulpfile C:\MyDev\helloworld-webpart\gulpfile.js
[09:26:04] Starting gulp
[09:26:04] Starting 'trust-dev-cert'...
[09:26:04] Starting subtask 'trust-cert'...
[09:26:06] [trust-cert] Attempting to trust a dev certificate. This self-signed certificate only points to localhost and
 will be stored in your local user profile to be used by other instances of gulp-core-build-serve. If you do not consent
 to trust this certificate, click "NO" in the dialog.
[09:26:06] Error - [trust-cert] Error: root "Trusted Root Certification Authorities"
Signature matches Public Key
CertUtil: -addstore command FAILED: 0x80070005 (WIN32: 5 ERROR_ACCESS_DENIED)
CertUtil: Access is denied.

[09:26:06] Error - [trust-cert] Certificate trust failed with an unknown error.
[09:26:06] Error - 'trust-cert' sub task errored after 1.82 s
 "Error trusting development certificate."
[09:26:06] 'trust-dev-cert' errored after 1.82 s
[09:26:06]
[09:26:07] ==================[ Finished ]==================
Error - [trust-cert] Error: root "Trusted Root Certification Authorities"
Signature matches Public Key
CertUtil: -addstore command FAILED: 0x80070005 (WIN32: 5 ERROR_ACCESS_DENIED)
CertUtil: Access is denied.

Error - [trust-cert] Certificate trust failed with an unknown error.
Error - 'trust-cert' sub task errored after 1.82 s
 "Error trusting development certificate."
1

Sounds like you don't have permissions to install the cert. Can you try running from an elevated command prompt?

0

The command will install the certificate in physical location. You should open the npm command prompt as an administrator and run the command.

0

I had the same issue. The cert install was supposed to prompt a confirmation dialog with "yes/no" buttons and it was not appearing for me when I ran the "gulp trust-dev-cert". My local user account had admin rights and I was on elevated CMD. Then I tried the same command after logging in as another local user with admin rights and the prompt opened up for me. Clicking "yes" on the prompt dialog resulted in successful installation of dev cert.

I think the local account that I was using had some internal issues (had some troubles while creating the account and I don't think it was created properly. On the other hand the second user account was almost perfect)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.