title: Getting Credentials of Current User in Jenkins Pipeline Script
body: <p>I have a job that needs to be triggered manually by a logged-in LDAP account. The job contains a step that syncs a git repo, in which the same LDAP account is used for git credentials. </p>
  
  <p>Is it possible to get the <code>credentialsId</code> of the person who is currently logged in and is triggering a job? I'm imagining code like this:</p>
  
  <pre><code>def credential = getCurrentUserCredential() // ???
  git credentialsId: credential, url: 'git.repo'
  </code></pre>