James12
(James12)
October 31, 2018, 7:51pm
1
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?
Hi @James12 ,
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.
Best regards,
Daniel
James12
(James12)
November 1, 2018, 1:26pm
4
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.
James12
(James12)
November 1, 2018, 1:50pm
5
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)
[IO.File]::WriteAllBytes($certFullFilePath, $bytes)
Hi James,
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.
Best regards,
Daniel
system
(system)
Closed
December 6, 2018, 2:37am
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.