You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to execute the deploy task, the executeSudo method doesn't prompt for sudo password. I have tried using other solutions for getting the sudo password from the user described in #302 and #16. When I run the task I get the error org.hidetake.groovy.ssh.interaction.InteractionException: Error while stream interaction: org.hidetake.groovy.ssh.session.execution.SudoException: Failed sudo authentication on jsonet[jsonet.ddns.net:22]: Sorry, try again.
The task works fine when I set the sudoPassword in plain text but I would really like to avoid storing the sudo password in plain text somewhere.
task deploy(dependsOn: distTar) {
description ='Uploads the server distribution to the remote app server.'
group ='distribution'
doLast {
ssh.run {
session(remotes.role('appServer')) {
def targetFile ="${applicationName}-${version}.tar"
put from: newFile(newFile(buildDir, "distributions"), targetFile),
into: "/tmp"
executeSudo "mv /tmp/$targetFile /opt", pty: true
}
}
}
}
The text was updated successfully, but these errors were encountered:
Environment info
gradle-ssh-plugin-2.9.0 (groovy-ssh-2.9.0, jsch-0.1.53, groovy-2.4.12, java-1.8.0_144)
Description
When I try to execute the deploy task, the
executeSudo
method doesn't prompt for sudo password. I have tried using other solutions for getting the sudo password from the user described in #302 and #16. When I run the task I get the errororg.hidetake.groovy.ssh.interaction.InteractionException: Error while stream interaction: org.hidetake.groovy.ssh.session.execution.SudoException: Failed sudo authentication on jsonet[jsonet.ddns.net:22]: Sorry, try again.
The task works fine when I set the
sudoPassword
in plain text but I would really like to avoid storing the sudo password in plain text somewhere.The text was updated successfully, but these errors were encountered: