title: How to get username password stored in Jenkins credentials separately in jenkinsfile
body: <p>I've stored username and password as credentials in jenkins. Now I would like to use them in my Jenkinsfile. </p>
  
  <p>I am using <code>withCredentials</code> DSL, however, I'm not sure how to get the username password as separate variables so I can use them in my command. </p>
  
  <p>This is what I'm doing:</p>
  
  
  
  <pre><code>withCredentials([usernameColonPassword(credentialsId: 'mycreds', variable: 'MYCREDS')]) {
    sh 'cf login some.awesome.url -u &lt;user&gt; -p password'
  }
  </code></pre>
  
  <p>How can I the username and passwork separately? I tried doing <code>${MYCREDS.split(":")[0]}</code> but that doesn't seem to work. </p>