gpt4 book ai didi

mysql - jenkins 在重新启动我的 sql "sudo: no tty present and no askpass program specified Sorry, try again."时失败

转载 作者:可可西里 更新时间:2023-11-01 07:03:37 24 4
gpt4 key购买 nike

我刚刚配置了 jenkins 并且在预构建步骤中我试图重新启动 jenkins 但我最终遇到以下错误

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

我用谷歌搜索并在 Jenkins out of nowhere starts failing with sudo: no tty present and no askpass program specified 上看到了一些答案

但不幸的是,这对我没有帮助

我的/etc/sudoers 看起来像这样

#
# 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

最佳答案

通过添加以下内容:默认值:用户名 !authenticate到你的/etc/sudoers你不应该得到这个错误,但是这个用户名不需要密码就可以访问

关于mysql - jenkins 在重新启动我的 sql "sudo: no tty present and no askpass program specified Sorry, try again."时失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16408877/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com