Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-66694

Invalid private key causes "Instance creation fails because: null"

XMLWordPrintable

    • v1.0.15

      if credentials private key is incorrect then readObject() returns null and further code fails with error java.lang.Exception: Instance creation fails because: null
      /oracle-cloud-infrastructure-compute-plugin/src/main/java/com/oracle/cloud/baremetal/jenkins/SshKeyUtil.java
      public static String getPublicKey(String privateSshKey, String privateSshKeyPassphrase) throws IOException, NotImplementedException {
      ...
      Object keyObj = new PEMParser(new StringReader(privateSshKey)).readObject(); <<<<< keyObj is null if privateSshKey is invalid key
      ...
      PEMEncryptedKeyPair encKeyPair = (PEMEncryptedKeyPair) keyObj;
      ...
      keyPair = encKeyPair.decryptKeyPair(decryptionProv);

            sindhusri16 Yarlagadda Sindhu Sri
            denis_kishchenko Denis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: