我有一个Jenkins构建,在完成后,我希望在远程存储库中为该版本创建一个分支。
我有如下的git发布设置:
但是当我运行它时,标记似乎运行得很好,但是分支提供了:
ERROR: Failed to push branch RELEASE-5 to jsched
hudson.plugins.git.GitException: Command "git.exe push
https://myid@git.server:9443/scm/win/jsched.git HEAD:RELEASE-5" returned status code 1:
stderr: error: unable to push to unqualified destination: RELEASE-5
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to 'https://myid@git.server:9443/scm/win/jsched.gitt'
我做错了什么?
发布于 2018-10-01 22:26:18
您正在将本地RELEASE-ID分支推送到远程,但问题是,由于它是一个新创建的分支,它没有定义上游,因此git不知道将提交推送到哪里。
如果你“手动”做这个,你应该告诉git使用remote/RELEASE-ID作为上游。Jenkins接口不允许您定义这样的行为。也许你可以用一个脚本来实现类似的功能。
https://stackoverflow.com/questions/52590018
复制相似问题