> @@ -62,7 +64,19 @@
> public static void checkSecretKeyFile(String secretKeyFile) {
> checkNotNull(emptyToNull(secretKeyFile), "System property:
> [test.ssh.keyfile] set to an empty string");
> if (!new File(secretKeyFile).exists()) {
> - throw new IllegalStateException("secretKeyFile not found at: " +
> secretKeyFile);
> + // Create file if missing
> + try {
> + JSch jsch = new JSch();
> + KeyPair kPair = KeyPair.genKeyPair(jsch, KeyPair.RSA);
> + kPair.writePrivateKey(secretKeyFile);
> + kPair.writePublicKey(secretKeyFile + ".pub", "jclouds generated
> key pair");
> + System.out.println("jclouds generated finger print: " +
> kPair.getFingerPrint());
This println is probably not necessary?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/667/files#r24118200