Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 23 12:09

    nrayapati on maven

    (compare)

  • Jan 23 12:09

    nrayapati on master

    Bump assertj-core from 3.24.1 t… (compare)

  • Jan 23 12:09
    nrayapati closed #85
  • Jan 23 12:08

    nrayapati on master

    Bump plugin from 4.53 to 4.54 (… (compare)

  • Jan 23 12:08

    nrayapati on maven

    (compare)

  • Jan 23 12:08
    nrayapati closed #84
  • Jan 23 07:08
    dependabot[bot] labeled #85
  • Jan 23 07:08
    dependabot[bot] labeled #85
  • Jan 23 07:08
    dependabot[bot] opened #85
  • Jan 23 07:08

    dependabot[bot] on maven

    Bump assertj-core from 3.24.1 t… (compare)

  • Jan 23 07:08
    dependabot[bot] labeled #84
  • Jan 23 07:08
    dependabot[bot] labeled #84
  • Jan 23 07:08
    dependabot[bot] opened #84
  • Jan 23 07:08

    dependabot[bot] on maven

    Bump plugin from 4.53 to 4.54 … (compare)

  • Jan 22 22:27

    github-actions[bot] on 2.0.65.vd26b_5b_9b_de4d

    (compare)

  • Jan 22 22:16

    nrayapati on master

    Bump jna-platform from 5.12.1 t… (compare)

  • Jan 22 22:16
    nrayapati closed #83
  • Jan 22 22:16

    nrayapati on maven

    (compare)

  • Jan 22 22:07
    nrayapati labeled #83
  • Jan 22 22:07
    nrayapati assigned #83
zdrescher
@zdrescher
Thanks for the quick feedback!
zdrescher
@zdrescher
That worked! Thanks again!!
Naresh Rayapati
@nrayapati
Thank you for reporting!
zdrescher
@zdrescher
Hmmm actually, I may have spoke too soon...
i am getting a similar error:
Failed command mlops-dev1#69 with status -1: source helps/train.sh
when i run the same script as the same user on the remote
echo $?
returns 0
zdrescher
@zdrescher
So instead of running the command i've been trying i ran something along the lines of "for i in {1..10}; do echo -n \"Loop \$i \"; date ; sleep 1m; done"
the idea is to do something that takes as long as the command to see if it has a similar issue. it doesnt.
I think part of the problem is that the command i am running (a python process) isn't printing to stdout.
It should be but for whatever reason its not.
which maybe what's causing the ssh stream to timeout.
deepak
@deepakts2013

@here : I am tring to execute command remotely via Jenkins Pipeline using sshCommand Step :

sshCommand(remote : remote , command : "/usr/bin/sed -i '/currentURL/c "currentURL" : "https://packages.vmware.com/htb/8d167796-34d5-4899-be0a-6daade4005a3/latest/"'  /./etc/applmgmt/appliance/update.conf")

I end up getting error : 'Unknown command: `/usr/bin/sed''
out put as follows :

Executing command on 192.168.9.197[192.168.9.197]: /usr/bin/sed -i '/currentURL/c "currentURL" : "https://packages.vmware.com/htb/8d167796-34d5-4899-be0a-6daade4005a3/latest/"'  /./etc/applmgmt/appliance/update.conf;/usr/bin/sed -i '/defaultURL/c "defaultURL":  "https://packages.vmware.com/htb/8d167796-34d5-4899-be0a-6daade4005a3/latest/",' /./etc/applmgmt/appliance/update.conf;service-control --restart vlcm; sudo: false
Unknown command: `/usr/bin/sed'
Can anyone help
Benjamin Goldberg
@benjigoldberg
Hi all, I'm encountering an odd error (perhaps user error?) with this plugin. I have something like the following:
withCredentials([sshUserPrivateKey()]) {
    script {
        def remote = [:]
        remote.name = params.TARGET_HOST
        remote.host = params.TARGET_HOST
        remote.user = SSH_USERNAME
        remote.identity_file = SSH_PRIVATE_KEY
        remote.allowAnyHosts = true
        sh "ssh -i ${remote.identity_file} ${remote_user}@${remote.host} 'ls -alh'"
        sshCommand remote: remote, command: 'ls -alh'
    }
}
the first raw sh "ssh..." works fine. However, the sshCommand exits with an error eg com.jcraft.jsch.JSchException: Auth fail
any ideas re: what I might be doing wrong here?
Mohamad Farhan
@MamlukZephyr
Hi I am currently testing the plugin with jenkins master slave setup. When I tried to use the slave at ssh step the process hang even with plain text password. So, my question is, have anyone tried to use master slave setup using this plugin?
sharpedavid
@sharpedavid
@nrayapati Maybe this has been asked before, but would you consider enabling the "Issues" tab on GitHub? https://github.com/jenkinsci/ssh-steps-plugin I think it helps give the project a certain life.
1 reply
sharpedavid
@sharpedavid
Has anyone had any luck using this command with sudo? When I use the supported sudo option, the script just hangs indefinitely. It doesn't prompt interactively, and it doesn't use the existing password
sharpedavid
@sharpedavid

I think I figured it out, actually, I found my answer in the CHANGELOG

sshCommand with sudo:true param also requires pty:true on remote config with this upgrade. (This is only applicable for few platforms like Linux so apply this accordingly)

sharpedavid
@sharpedavid
I found this great video, Jenkins SSH Pipeline Steps Plugin - SpringBoot Deployment, and all the code is on GitHub
Izmar Verhage
@izzyreal
Hi all, I'm trying to use credentials inside one of my sshCommands, is this possible? For example
    withCredentials([
        string(credentialsId: 'credstest', variable: 'TOKEN')
        ]) {        
        stage("SSH") {
            sshCommand remote: remote, command: 'echo ${TOKEN}'
        }
    }
sjothili
@sjothili

How to submit the Jenkins job using curl api and get its buid number ? Note - i tried with the following api, but its not printing any build number.

curl -X POST http://<hostname>:8080/job/<jobname>/build

Hamid
@hamidgholami

Hello all!
I have problem with using SSH Pipeline Step plugin.
Jenkins core version: 2.361.1
SSH Pipeline Steps plugin version: 2.0.39.v831c5e6468b_c
the way that I have created a ssh key pair: "ssh-keygen -m PEM -t rsa -b 4096" (with passphrase)

def remote= [:]
remote.name = test
remote.host = test-mycompony.com
remote.allowAnyHosts = true
node {
 withCredentials([sshUserPrivateKey(credentialsId: 'mySSH', keyFileVariable: 'myIdentity', passphraseVariable: 'myPass', usernameVariable: 'userName')]) {
                      remote.user = userName
                      remote.identityFile = myIdentity
                      remote.passphrase = myPass
                      stage('Post-build: Archive artifacts') {
                          writeFile file: 'abc.sh', text: 'ls'
                          sshCommand remote: remote, command: 'for i in {1..5}; do echo -n \"Loop \$i \"; date ; sleep 1; done'
                          sshPut remote: remote, from: 'abc.sh', into: '.'
                          sshGet remote: remote, from: 'abc.sh', into: 'bac.sh', override: true
                          sshScript remote: remote, script: 'abc.sh'
                          sshRemove remote: remote, path: 'abc.sh'
                      }
                 }
}

I'm just getting Auth fail

com.jcraft.jsch.JSchException: Auth fail

Do you have any idea?