I'm painfully new to Jenkins so I'm sorry for the silly question. I'm trying to get my jenkins to publish my .jar via SSH using the following:
sshPublisher(publishers: [sshPublisherDesc(configName: 'Tech-O-Dex-API', transfers: [sshTransfer(excludes: '', execCommand: 'ssh -i D:\\Work\\KeyPairs\\Deploy\\Tech-O-Dex-APII -n -f ec2-user@ec2-<IP>.compute-1.amazonaws.com "sh -c \'cd ~/; java -jar Tech-O-Dex-0.1.0.jar /dev/null &\\\'"', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '', remoteDirectorySDF: false, removePrefix: '', sourceFiles: ' \'target/*.jar\'')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
however, I'm getting the following error:
Warning: Identity file D:WorkKeyPairsDeployTech-O-Dex-API not accessible: No such file or directory.
I've tried specifying the key file, pem and ppk, nothing works? The file exists becasue I can use
scp -i D:\Work\KeyPairs\Tech-O-Dex-API D:\Jenkins\workspace\Tech-O-Dex\target\Tech-O-Dex-0.1.0.jar ec2-user@ec2-<IP>.compute-1.amazonaws.com:~/
inf the cmd line and it works fine to my EC2?
I'm on a windows machine which I'm almost positive is what is causing all of these headaches haha. Any help would be appreciated. Thanks
sources tried reference: Can't ssh to AWS EC2: Identity file not accessible