title: Jenkins: Decrypting all passwords in credentials.xml (via Jenkins execution console)
body: <p>How to decrypt all credentials in the Jenkins credentials.xml using the Jenkins console, in bulk?</p>
  
  <p>I can do this one secret at a time using this snippet of groovy:</p>
  
  <pre><code>node {
      def creds
  
      stage('Sandbox') {
          withCredentials([string(credentialsId: 'VAC_USER',variable: 'C_PASS')]) {
              creds = "\nUser: ${C_USER}\nPassword: ${C_PASS}\n"
          }
  
          println creds
      }
  }
  </code></pre>
  
  <p>However, my knowledge of Groovy is 0, and it's not clear how to print out the entire credentials file, decrypted so that each decrypted password is shown next to it's id.</p>