import cert file to azure keyvault issues

0 votes

I added a.cert certificate to Azure DevOps as a secure file.

We employ traditional pipelines.

My pipeline now has two extra tasks.

Download a secure file first

2, import Azure Cli task.

add below script as an inline script from the cert file

Keyvault certificate import —vault-name "keyvaultname" -n "mycert.com.crt" -f $certFilePath = $(Agent.TempDirectory)mycert.com.crt $certFilePath

receiving the error below

The phrase "D:agent work tempmycert.com.crt" is not recognised as the name of a cmdlet, function, script file, or executable programme. Verify the name's spelling, or if a path was included, make sure the path is accurate and try again. Azureclitaskscript1675572660483 inlinescript.ps1:1 char:12 at D:agent work temp

MyCert.com.crt is located in the folder D:agent work temp.
Category
ObjectNotFound information: Mycert.com.crt:String (D:agent work temp), ParentContainsErrorRecordException FullyQualifiedErrorId: CommandNotFoundException

Feb 7, 2023 in DevOps on Cloud by Damonlang
• 1,230 points

edited 4 days ago 91 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP