I tried using the Import Certificate step template but keep getting this error here:
Variable SSLCertificate.Pfx was not supplied
Fatal The remote script failed with exit code 1
Not sure what exactly is causing it, my only guess right now is maybe the way our variable is worded is causing this error?
Welcome to the community, thanks for reaching out!
After a quick test I wasn’t able to reproduce this on my end, could you please confirm how the certificate was created and if it has any scoping on the variable?
Has your certificate been configured in the project variables similar to mine below, or are you using a LibraryVariableSet for the certificate?
I did find an old issue which indicates that using variable binding for the certificate can cause this error, however we don’t allow for binding this anymore: Certificate variable value not supplied when using `Insert a Variable` function · Issue #4595 · OctopusDeploy/Issues · GitHub
Feel free to let me know if you have any questions at all, looking forward to getting to the bottom of this!
Thanks for the response.
Certificate was created from a step template we use in Octopus where you enter in as deployment target the CA server, then you enter in site name, enter the certificate template on the CA, enter in user creds and it creates a cert and uploads to Octopus and you can view them under Certificates.
Its configured like yours, I’m guessing one issue could be that we have 3 different certs stored in the SSLCertificate variable and scoped to different environments. In the Import Certificate step template for Runbook I set environment to Production and maybe having 2 scoped to production is causing issues?
Thanks for that extra info, I’ll keep trying to reproduce this on my end and let you know as soon as I have any updates!
Just an update I tried it with another project and the step template works perfectly but that project only had two certs and both were scoped to 1 separate environment.
Thanks for the update, that’s great to hear another project is working ok with less scoping!
Unfortunately I haven’t been able to repro this on my end, all my tests playing around with scoping are working ok, however I’d still like to get to the root cause of this error.
Would you be willing to share your Task logs with Variable Logging enabled? That should give me all the info I need to see exactly what’s going on with the certificate evaluation.
You can upload any files securely here, please let me know if there are any issues with it!