我正在尝试按照Axel Fontaine(http://axelfontaine.com/blog/final-nail.html)的描述配置Jenkins/Maven/Git发布构建作业.我按照他的描述添加了我的POM,并相应地配置了我的Jenkins工作.
在源代码管理部分,我输入了我们内部托管的Stash实例的存储库URL(需要用户名和密码 - SSH密钥不是一个选项): https://stash.mycompany.com/scm/st_proj/my_repo.git
我提供了用户名/密码凭据.
正如在博客文章中我创建了一个具有目标的Maven预备步骤versions:set -DnewVersion=$BUILD_NUMBER.
同样在博客文章中,我将构建目标设置为deploy scm:tag.
当作业执行时,我得到以下错误.
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR]
(gnome-ssh-askpass:32706): Gtk-WARNING **: cannot open display:
error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass'
fatal: could not read Username for 'https://stash.mycompany.com': No such device or address
Run Code Online (Sandbox Code Playgroud)
我意识到这是因为Git命令试图提示我输入用户名和密码,但由于这是作为Jenkins的工作运行的,因此没有显示它发送提示.
当我在作业配置中先前设置用户名和密码时,为什么会提示我输入用户名和密码?我知道它们是正确的,因为它们需要克隆存储库.