使用jenkins-ssh插件,我试图连接到远程服务器并从jenkins部署更改,尝试在服务器上运行命令。
构建成功。 Jenkins日志消息说文件已经传输但是当我检查服务器目录时,我找不到任何文件。
在此转移之后,它正在尝试在服务器上执行命令,但它没有这样做。我配置了主机名,用户名,端口,密码等详细信息,并在" Manage Jenkins"中配置。测试配置也是如此,这是成功的。
但是,在日志结束时,它会抛出错误,如下所示。如果您对这些问题有所了解,有人可以帮助我吗?我做错了什么,请让我知道,我会纠正它。这对我有帮助。感谢。
Total time: 3 seconds
[name of server configuration] $ /bin/sh -xe /tmp/jenkins1043789630298533742.sh
+ ssh user@servername /bin/bash
(gnome-ssh-askpass:32106): Gtk-WARNING **: cannot open display:
Permission denied, please try again.
(gnome-ssh-askpass:32107): Gtk-WARNING **: cannot open display:
Permission denied, please try again.
(gnome-ssh-askpass:32119): Gtk-WARNING **: cannot open display:
Permission denied (publickey,gssapi-with-mic,password,hostbased).
Build step 'Execute shell' marked build as failure
SSH: Connecting from host [server]
SSH: Connecting with configuration [name of server configuration] ...
SSH: Disconnecting configuration [name of server configuration] ...
SSH: Transferred 11 ( 7 + 3 + 1 ) file(s)
SSH: Current build result is [FAILURE], not going to run.
Finished: FAILURE
答案 0 :(得分:0)
您是否尝试通过命令行以管理员身份执行,或者您可以在尝试执行的路径上授予权限。 建议:尝试使用sudo运行命令。