I have a certificate stored in the Certificates section in Octopus.
During a deploy, I do not want to install it in the computers certificate store or use it in IIS https bindings.
I want to just be able to place it in the deployment folder where the rest of my application gets extracted to. I could not figure out a way to accomplish this. Is this possible?
Thanks for getting in touch! Octopus has a built in certificate store which lets you do what you are after here.
Let me know if this helps, or if you have any further questions.
I already have my certificate in the Octopus built in certificate store, but there appears to be only two things you can do with a certificate:
- Import it into a Windows Certificate store on a target machine.
- Use it in HTTPS binding in IIS
I don’t want to do either of these. I want to treat it like a file and basically FTP as is to a local folder.
I was able to figure out a way to do this with powershell via a “Post-deployment script” in the deploy package step:
#Get Certificate Values
$certName = $OctopusParameters["My.Cert.Name"]
$b64 = $OctopusParameters["My.Cert.RawOriginal"]
$certFullFilePath = Join-Path -Path $cerPath -ChildPath $certName
#Create the Certificate File
$bytes = [Convert]::FromBase64String($b64)
Thanks for the update here! I’m glad you found and shared your solution here.
Please feel free to get in touch at any time.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.