ho appena configurato Jenkins e nel pre-compilazione passi che sto cercando di riavviare Jenkins, ma io alla fine con il seguente errorejenkins non riesce mentre si riavvia il mio sql "sudo: nessun tty presente e nessun programma askpass specificato Spiacente, riprovare."
Commencing build of Revision c5b9f8daac092efc5396d80f568a2cf89ae8b697 (origin/HEAD, origin/master)
Checking out Revision c5b9f8daac092efc5396d80f568a2cf89ae8b697 (origin/HEAD, origin/master)
No change to record in branch origin/HEAD
No change to record in branch origin/master
[webapp] $ /bin/sh -xe /tmp/hudson5215632082686866774.sh
+ sudo /etc/init.d/mysql restart
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: 3 incorrect password attempts
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Ho cercato su google e ho visto alcune risposte a Jenkins out of nowhere starts failing with sudo: no tty present and no askpass program specified
Ma purtroppo che didn 't aiutarmi
mio/etc/sudoers assomiglia a questo
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) NOPASSWD: ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
miei comando restituisce ID questa uid = 108 (Jenkins) gid = 65534 (nogroup) gruppi = 65534 (nogroup), 111 (admin) penso che la Jenkins utente è in gruppo admin quindi sudo non è il problema. Quando dici "In questo caso, sudo non ha un tty per chiedere la password e quindi l'errore" cosa significa esattamente? Come aggiungo tty? –