Jenkins构建失败,修订版错误

时间:2016-02-25 09:51:28

标签: python git jenkins

我试图在简单的Python测试中运行Jenkins。这是我的第一次,所以我按照本教程中提到的步骤进行操作:Link

触发构建后,我的Jenkins控制台输出显示失败,因为它无法找到任何修订。

这是控制台输出:

Started by user anonymous
Building in workspace    /usr/share/tomcat7/.jenkins/jobs/PythonUIProject/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url /home/rahul/PycharmProjects/.git/ # timeout=10
Fetching upstream changes from /home/rahul/PycharmProjects/.git/
> git --version # timeout=10
> git -c core.askpass=true fetch --tags --progress /home/rahul/PycharmProjects/.git/ +refs/heads/*:refs/remotes/origin/*


Seen 0 remote branches
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

我的Git安装文件夹是:home/rahul/PycharmProjects/,我的系统是Ubuntu 14.04 LTS

我尝试将Branches to Build下的Source Code Management configuration更改为**代替*/master作为解决方法,但它没有用。

之前有人为此工作吗?应该解决这个问题。

编辑1:根据建议我尝试使用git push推送代码,但我得到了这个:

  rahul@oneplusone:~/PycharmProjects$ git push -u /home/rahul/PycharmProjects/.git master
  error: src refspec master does not match any.
  error: failed to push some refs to '/home/rahul/PycharmProjects/.git'

1 个答案:

答案 0 :(得分:1)

确保你的分支被推高了。如果不这样做,您可以尝试删除' * /'来自您的分支(只需使用master代替*/master