Skip to main content

How do I use credentials-binding in a freestyle project?



  • Denys Digtiar

    Secrets by default are hidden on the UI to protect you from the accidental exposure. The environment variable to which the secrets are bound should contain actual values.

  • Brian Auron

    Hi Denys,


    So the plugin (or Jenkins itself?) looks for the value of the password and masks it in the console regardless of where that value is stored?

    For example, given the binding:

    - credentials-binding:
         - username-password-separated:
            credential-id: super-awesome-creds-id
            username: SUPERAWESOMEUSER
            password: SUPERAWESOMEPASS

    and shell build step:

    #!/usr/bin/env bash

    echo "I found it: ${tempvar}"


    then it's expected that the echo will produce "****" (which it does)?

  • Denys Digtiar

    Yes, in this case, I believe it is the Credentials Binding plugin that does the Console Output filtering but it is enabled by the extension points in the Jenkins core.


Please sign in to leave a comment.

About CloudBees Support

Our Support Engineers are available to help with any questions or problems you may have with any of our products.