Error using Import Certificate step

Hi,

In some of our projects the Import Certificate step works perfectly well. But in some other projects we get this error when deploying:

Variable certificates-<some_name>.Pfx was not supplied 
The remote script failed with exit code 1 

I’ve tried deleting and recreating the Import Certificate step, and deleting and recreating the variable of type Certificate that we refer to in the Import Certificate step with no luck.

Any ideas on what could be causing this?

Thanks,
Pete

Hi Pete,

Thanks for getting in touch! I suspect the issue may come down to the way the variable is scoped where it isn’t able to be evaluated at deployment. Where have you defined the certificate variable, and how have you scoped it? Would you be willing to provide a screenshot of the variable’s configuration and also your Import Certificate step?

I look forward to hearing back and getting to the bottom of this one!

Best regards,

Kenny

Thanks for getting back to me Kenny!

Here is the Import Certificate step:

Here is the where the variable is scoped:

Here is what it looks like in variable preview:

And here is the error from the deploy:

The variable preview is especially interesting, no?

Regards,
Pete

Hi Pete,

Thanks for following up! It looks like the issue is the variable format you’ve provided in the Certificate Variable field isn’t valid and Octopus is unable to find the certificate so the substitution fails. With this specific step template the variable to be defined here is different from the standard variable substitution syntax and it needs to be just the variable name (FDI Cert instead of #{FDI Cert}).

Let me know if this helps and how you go!

Best regards,

Kenny

Hi Kenny,

Thanks for your prompt response!

That worked!

Hi Pete,

You’re very welcome! Glad it helped get it working for you. :slight_smile:

Don’t hesitate to reach out if you have any further questions going forward!

Best regards,

Kenny

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.