Monorepo for Aesthetic.Computer aesthetic.computer
at main 46 lines 2.0 kB view raw
1# Install mkcert CA root certificate into Windows Trust Store 2# Run this in PowerShell as Administrator 3 4# First, copy the cert from the container/volume to a temp location 5$tempCert = "$env:TEMP\mkcert-rootCA.pem" 6 7# Try multiple possible paths 8$possiblePaths = @( 9 "\\wsl.localhost\Ubuntu\workspaces\aesthetic-computer\ssl-dev\rootCA.pem", 10 "\\wsl$\Ubuntu\workspaces\aesthetic-computer\ssl-dev\rootCA.pem" 11) 12 13$certPath = $null 14foreach ($path in $possiblePaths) { 15 if (Test-Path $path) { 16 $certPath = $path 17 break 18 } 19} 20 21if ($certPath) { 22 Write-Host "📜 Found certificate at: $certPath" -ForegroundColor Green 23 Copy-Item $certPath $tempCert -Force 24 Write-Host "📜 Installing mkcert CA root certificate into Windows Trust Store..." -ForegroundColor Cyan 25 Import-Certificate -FilePath $tempCert -CertStoreLocation Cert:\LocalMachine\Root 26 Remove-Item $tempCert 27 Write-Host "✅ CA root certificate installed successfully!" -ForegroundColor Green 28 Write-Host "" 29 Write-Host "⚠️ Please RESTART YOUR BROWSER (fully close and reopen) for changes to take effect." -ForegroundColor Yellow 30 Write-Host "" 31 Write-Host "Your HTTPS URLs should now work:" -ForegroundColor Cyan 32 Write-Host " • https://localhost:8888" 33 Write-Host " • https://localhost:3002" 34 Write-Host " • https://localhost:8889" 35} else { 36 Write-Host "❌ Certificate file not found." -ForegroundColor Red 37 Write-Host "" 38 Write-Host "📋 Manual installation steps:" -ForegroundColor Yellow 39 Write-Host "1. From the Docker container, copy the certificate:" 40 Write-Host " docker cp <container-name>:/workspaces/aesthetic-computer/ssl-dev/rootCA.pem C:\Users\$env:USERNAME\Downloads\rootCA.pem" 41 Write-Host "" 42 Write-Host "2. Then run this command:" 43 Write-Host " Import-Certificate -FilePath C:\Users\$env:USERNAME\Downloads\rootCA.pem -CertStoreLocation Cert:\LocalMachine\Root" 44 Write-Host "" 45 Write-Host "3. Restart your browser" 46}