Skip to content

Commit

Permalink
Fix newlines for ssh keys from keystore
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Michalek committed Jul 14, 2022
1 parent ca99ed7 commit 00f9d80
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public int run() throws Exception {
perms.add(PosixFilePermission.OWNER_WRITE);
Files.setPosixFilePermissions(tempPkFile.toPath(), perms);

Files.write(tempPkFile.toPath(), sshPrivateKey.getBytes());
Files.write(tempPkFile.toPath(), sshPrivateKey.replaceAll("\r\n","\n").getBytes());
procArgs.add("--private-key" + "=" + tempPkFile.toPath());

if(sshUseAgent){
Expand Down

0 comments on commit 00f9d80

Please sign in to comment.