在我的jenkins文件中,以下命令失败
代码: 阶段(“发布”){ 脚步 { sh'/ opt / maven / bin / mvn --batch-mode release:clean release:prepare release:perform' } } stage('Update Rel'){ 脚步 { sh'git push https://xxxx:password@github.com/dxtrsd/maven-multi-module-example.git HEAD:master' }
构建失败:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.0-M1:prepare (default-cli) on project multi: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] fatal: could not read Username for 'https://github.com': No such device or address
[ERROR] -> [Help 1]
[ERROR]
答案 0 :(得分:1)
在Bootstrap your CI with Jenkins and GitHub中输入“ Michael Wanyoike”之后,您需要首先输入GitHub凭据:
然后,您需要在URL下选择该凭据(该图像显示SSH URL,但在您的情况下,请使用HTTPS URL)
答案 1 :(得分:0)
我通过在POM.xml文件中的块中的开发人员连接URL中提供用户和密码来解决此问题