brent-robinson / posh-acme-azure-example

Example using the Posh-ACME PowerShell module to orchestrate TLS certificate issuance using ACME in Azure with Azure DevOps
https://medium.com/@brentrobinson5/automating-certificate-management-with-azure-and-lets-encrypt-fee6729e2b78
MIT License
30 stars 27 forks source link

The certificate data cannot be read with the provided password, the password may be incorrect. #14

Open robertvgill opened 2 years ago

robertvgill commented 2 years ago

Hi,

I am getting the below error when my Azure DevOps pipeline tries to import the wildcard certificate into the key vault.

VERBOSE: Importing alias 'Get-PAAuthorizations'. New-Object: /azp/_work/1/s/Import-AcmeCertificateToKeyVault.ps1:34 Line | 34 | … rtificate = New-Object -TypeName System.Security.Cryptography.X509Cer … | ~~~~~~~~~~~~~ | Exception calling ".ctor" with "3" argument(s): "The | certificate data cannot be read with the provided password, | the password may be incorrect."

[debug]Exit code 1 received from tool '/usr/bin/pwsh'

[debug]STDIO streams have closed for tool '/usr/bin/pwsh'

[debug]task result: Failed

[error]PowerShell exited with code '1'.

[debug]Processed: ##vso[task.issue type=error;]PowerShell exited with code '1'.

[debug]Processed: ##vso[task.complete result=Failed;]PowerShell exited with code '1'.

[debug]task result: Failed

[error]PowerShell wrote one or more lines to the standard error stream.

[debug]Processed: ##vso[task.issue type=error;]PowerShell wrote one or more lines to the standard error stream.

[debug]Processed: ##vso[task.complete result=Failed;]PowerShell wrote one or more lines to the standard error stream.

Finishing: Import Certificate into Key Vault

robertvgill commented 2 years ago

Hi again,

I was able to resolve the issue on my own.

Thanks!