OfficeDev / generator-office

Yeoman generator for building Microsoft Office related projects.
https://www.npmjs.com/package/generator-office
MIT License
815 stars 207 forks source link

Unable to install CA cert for local development on Windows 10 with VSCode #809

Closed keyiwu closed 5 months ago

keyiwu commented 5 months ago

os:windows 10 19041.3803 powerShell:5.1.19041.3803 PSEdititon: Desktop node :18.13.0 npm:8.19.3 Step1: npm install --global office-addin-dev-certs Step2: npx ooffice-addin-dev-certs install result:

Installing  CA ceritificate "Developer CA for Microsoft Office Add-ins"...
Error: Unable to install the CA certificate.Access is denied.
ApplicationInsights::CorrelationIdMabager:[
 Error: read ECONNREST
         at TLSWrap.onStreamRead (node:internal /stream_base_commons:217:20)
         at  TLSWrap.callbackTramoline (node: internal/asyn_books:130:17)
 errno:-4077,
 code:"ECONNREST",
syscall:"read"

]
keyiwu commented 5 months ago

Get-Command -name Import-Certificate it is working Import-Certificate -CertStoreLocation cert:\$machine\Root ${C:\Users\keyiwu\.office-addin-dev-certs} not working Access to the path 'C:\Users\keyiwu.office-addin-dev-certs' At line1 char1 +Import-Certificate -CertStoreLocation cert:\$machine\Root ${C:\Users... + +CategoryInfo : PermissionDenied. (C:\Users\keyiwu.office-addin-dev-certs:String) [], UnauthorizedAccess sException +FullyQualifiedErrorId:GetContentReaderUnauthorizedAccessError