Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Information about $PSCredential



  • So I am trying to figure out the $PSCredential property. I am assuming it's not as simple as just putting a password in plain text for everyone to see? That would be a total no-go. I am assuming that it is pulling the password that is stored from the user specified in "Resource Credentials"?

    If not, is there a way to pull those credentials from "Resource Credentials"? I see in each user, there is a "$GetCredentialProperty() function". I tried searching for an example of that without much luck. I Found this https://inedo.com/support/questions/5094 but doesn't shed alot of light except reinforce my belief of a password in plain text. Can anyone provide an example of how that works? Thanks!

    Product: Otter
    Version: 2.1.0



  • Apparently this was updated in BuildMaster but not Otter, here is the documentation for the updated version that also applies to yours, substituting $CredentialProperty for $GetCredentialProperty:


    # ProGetCreds is an instance of Inedo Product Credentials (i.e. InedoProduct::ProGetCreds) with 'Allow encrypted properties...' checked

    set $key = $CredentialProperty(ProGetCreds, ApiKey);
    set $host = $CredentialProperty(ProGetCreds, Host);
    
    Log-Debug Getting ProGet package from $host with API key: $key;
    
    ProGet::Get-Package(
        Credentials: ProGetCreds,
        Feed: hdars-1k,
        Name: hdars,
        Directory: $WorkingDirectory
    );
    

    Additionally, I will notify our product director to add an issue to fix this in Otter (it would still be backwards compatible, but the canonical name would become $CredentialProperty)


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation