How modify a certificate variable inside a project

david.araya's Avatar


15 Feb, 2018 09:38 PM

I have a bunch of certificates in mi octopus library. Each one has an environment scope.
I have a project where I install a certificate and bind it in IIS. For that, I create a project certificate variable pointed to a specific certificate variable of my library.
But when the project will run in different environments, it should use a different certificate. For example: when my project run in environment1 the certificate should be environement1certificate. In environment2 , it should be environment2certificate.
But , since my project certificate variable is pointed to environment1certificate it will use the same certificate every time.
I tried to fix the issue changing the name of the certificate with an environment variable name 'environment2certificate' , but when the process run, it says the certificate environment2certificate.pfx is not found. because the project certificate variable was set with environment1certificate.pfx.

So I don't know how configure the project in order to have the ability to use different pfx in every environment.
Your help is appreciate.

David A.

  1. Support Staff 1 Posted by Kenneth Bates on 16 Feb, 2018 05:48 AM

    Kenneth Bates's Avatar

    Hi David,

    Thanks for getting in touch! I'm sorry to hear about the confusion you're hitting. Using a different certificate per environment is definitely supported, but unfortunately I can't see what's causing it to not work in your scenario. I suspect it could come down to variable scoping, but I'd like to try to replicate this in my instance. Would you be able to provide some additional information to help me understand your environment better?

    • Could you provide a screenshot of your certificate variables in your project?
    • Could you also provide a screenshot of your IIS step where you're defining the certificate variable?

    I look forward to hearing back and getting to the bottom of this one. :)

    Kind regards,


  2. 2 Posted by david.araya on 20 Feb, 2018 04:22 PM

    david.araya's Avatar

    Hi Kenny,
    Apologies for the delay. First I will show you my issue in the certificate installation.Then, I can talk about the IIS step if needed, because I think if we fix the first issue I will resolve both scenarios.
    I attached how I defined the variable certificate inside the project and how I use it in the install cert step. Everything works as expected if I run in the environment where that specific certificate is the one I need to use.
    But , my concern is when the project will be deployed in a different environment. AS you see in the image the client certificate is pointed to certificate qartgtec1_client and this is for environment 1 , when it will run for environment 5, I need to use qartgtec5_client.
    For that reason I tried to do a change using another variable that has the name of the environment. but it doesn't work. I attached the change I did in order to use different certificates: ChangecertificateValue.jpg
    As you see in that image I use the value #{USERNAMEPREFIX}_CLIENT.
    In that case the variable #{USERNAMEPREFIX} = qartgtec5 . And I received the error:
    "Variable qartgtec5_CLIENT.Pfx was not supplied
    The remote script failed with exit code 1
    install cert on qartgtec5 "

    I hope you have enough information to help me.
    David A

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac