Git PullRequest job failed. Couldn't find any

2020-02-05 06:56发布

Yesterday my pullrequest jobs failed with the following output:

11:07:41  > git rev-parse origin/${sha1}^{commit}
11:07:41  > git rev-parse ${sha1}^{commit}
11:07:41 ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

I have made an investigation and saw that in property ${sha1} there was nothing. When i paste an absolute path to pull request builder like pr/341/merge instead of ${sha1} the build works. What it can be?

Git Client Plugin 1.9.0

GitHub API Plugin 1.44

7条回答
男人必须洒脱
2楼-- · 2020-02-05 07:33

I came across the same issue and spent 4 hours into it but finally got it resolved.

In my case, error was because of wrong Git exe. Inside Jenkins, while setting Git exe path on windows, set the path under cmd folder

In my case it was C:\Program Files\Git\cmd\git.exe

It resolved my issue.

查看更多
登录 后发表回答