Getting "Couldn't find any revision to build" error while using Jenkins with BitBucket repository

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting "Couldn't find any revision to build" error while using Jenkins with BitBucket repository

Saurabh Saxena
Hi All,

I am new to Jenkins and need your help with one of the error I am getting.

I have my local Jenkins setup with Tomcat, and have integrated it with BitBucket (Open Source) repository. While executing the build process I am getting the following error:

C:\Tools\PortableGit\git-bash.exe fetch --tags https://ssaxena007@.../ssaxena007/sk-test.git refs/remotes/origin/develop
Seen 0 remote branches
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

I googled the error however could not find any satisfactory answer to solve the issue.

Below are the details of my environment:

OS - Windows 7
Jenkins Version - 2.32.1 - Deployed locally on my machine with Tomcat 7.x
SCM Used - A private BitBucket repository from BitBucket.org
JDK - 1.8
Maven - 3.3.9
Git Client Used - gitbash.exe

Following are some of the links which I tried with no luck.

https://issues.jenkins-ci.org/browse/JENKINS-20502
https://issues.jenkins-ci.org/browse/JENKINS-35340
https://github.com/janinko/ghprb/issues/347
https://github.com/timols/jenkins-gitlab-merge-request-builder-plugin/issues/88

Could you please have a look into the issue details and let me know if I am doing anything wrong here.

Many thanks in advance for your suggestions

Best Regards,
-Saurabh


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/66a939de-faf8-4caf-af19-045847ffade8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Getting "Couldn't find any revision to build" error while using Jenkins with BitBucket repository

Mark Waite-2
Comments are inline.

Mark Waite

On Fri, Jan 6, 2017 at 2:53 PM Saurabh Saxena <[hidden email]> wrote:
Hi All,

I am new to Jenkins and need your help with one of the error I am getting.

I have my local Jenkins setup with Tomcat, and have integrated it with BitBucket (Open Source) repository. While executing the build process I am getting the following error:

C:\Tools\PortableGit\git-bash.exe fetch --tags https://ssaxena007@.../ssaxena007/sk-test.git refs/remotes/origin/develop
Seen 0 remote branches
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

When my jobs run a git fetch, the command typically looks like:
git fetch --tags --progress https://github.com/MarkEWaite/jenkins-bugs.git +refs/heads/*:refs/remotes/origin/* 
Notice the significant difference in the final argument to the command.  I believe that is the "refspec" which defines the references which should be fetched from the remote repository to the local repository.  That refspec is usually set after clicking the "Advanced" button on the "Repositories" section of the job configuration.  You should probably not set a value for that refspec, or if you set a value, you need to review carefully that the value you set is correct for your repository.

I admit that I used git for multiple years before I ever used a custom refspec.  I use it more often now, but still need to refer to the online help to assure I have the correct syntax.

I googled the error however could not find any satisfactory answer to solve the issue. 

Below are the details of my environment:

OS - Windows 7
Jenkins Version - 2.32.1 - Deployed locally on my machine with Tomcat 7.x
SCM Used - A private BitBucket repository from BitBucket.org
JDK - 1.8
Maven - 3.3.9
Git Client Used - gitbash.exe

Following are some of the links which I tried with no luck.

https://issues.jenkins-ci.org/browse/JENKINS-20502
https://issues.jenkins-ci.org/browse/JENKINS-35340
https://github.com/janinko/ghprb/issues/347
https://github.com/timols/jenkins-gitlab-merge-request-builder-plugin/issues/88

Could you please have a look into the issue details and let me know if I am doing anything wrong here.

Many thanks in advance for your suggestions

Best Regards,
-Saurabh


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/66a939de-faf8-4caf-af19-045847ffade8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtHOSHnDNq8MqLssDoK4Wr%3DM_ru9s1V7Lk%3D-Apr6466Hmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Getting "Couldn't find any revision to build" error while using Jenkins with BitBucket repository

Amila Gunathilake
In reply to this post by Saurabh Saxena

Capture.PNG

Hi Mr. Mark Waite,

I'm getting a same kind of issue when I created a Checkout stage with "refspec" and due to that my Pull request is failing, I cannot merge this in to my master branch.

Below is my checkout stage code for your reference. 



On Friday, January 6, 2017 at 4:53:37 PM UTC-5, Saurabh Saxena wrote:
Hi All,

I am new to Jenkins and need your help with one of the error I am getting.

I have my local Jenkins setup with Tomcat, and have integrated it with BitBucket (Open Source) repository. While executing the build process I am getting the following error:

C:\Tools\PortableGit\git-bash.exe fetch --tags <a href="https://ssaxena007@bitbucket.org/ssaxena007/sk-test.git" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fssaxena007%40bitbucket.org%2Fssaxena007%2Fsk-test.git\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGMQfv99a62TpbbvgJJUkzvw1ltoA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fssaxena007%40bitbucket.org%2Fssaxena007%2Fsk-test.git\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGMQfv99a62TpbbvgJJUkzvw1ltoA&#39;;return true;">https://ssaxena007@bitbucket.org/ssaxena007/sk-test.git refs/remotes/origin/develop
Seen 0 remote branches
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
<a href="http://stacktrace.jenkins-ci.org/search?query=Finished" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstacktrace.jenkins-ci.org%2Fsearch%3Fquery%3DFinished\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHssCpxo_9SBDo1QnB2Ildtqrjfaw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstacktrace.jenkins-ci.org%2Fsearch%3Fquery%3DFinished\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHssCpxo_9SBDo1QnB2Ildtqrjfaw&#39;;return true;">Finished: FAILURE

I googled the error however could not find any satisfactory answer to solve the issue.

Below are the details of my environment:

OS - Windows 7
Jenkins Version - 2.32.1 - Deployed locally on my machine with Tomcat 7.x
SCM Used - A private BitBucket repository from BitBucket.org
JDK - 1.8
Maven - 3.3.9
Git Client Used - gitbash.exe

Following are some of the links which I tried with no luck.

<a href="https://issues.jenkins-ci.org/browse/JENKINS-20502" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-20502\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEw-TwffhfQy5DJtPHuX_heGUDkBA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-20502\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEw-TwffhfQy5DJtPHuX_heGUDkBA&#39;;return true;">https://issues.jenkins-ci.org/browse/JENKINS-20502
<a href="https://issues.jenkins-ci.org/browse/JENKINS-35340" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-35340\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHqWQ-1gFSIl4YYeltW86Yj4QEdXg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-35340\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHqWQ-1gFSIl4YYeltW86Yj4QEdXg&#39;;return true;">https://issues.jenkins-ci.org/browse/JENKINS-35340
<a href="https://github.com/janinko/ghprb/issues/347" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjaninko%2Fghprb%2Fissues%2F347\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGJsZWkcvNWM85xOdcbySPj7nw8NA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjaninko%2Fghprb%2Fissues%2F347\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGJsZWkcvNWM85xOdcbySPj7nw8NA&#39;;return true;">https://github.com/janinko/ghprb/issues/347
<a href="https://github.com/timols/jenkins-gitlab-merge-request-builder-plugin/issues/88" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Ftimols%2Fjenkins-gitlab-merge-request-builder-plugin%2Fissues%2F88\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFyKmeQDxbwOgsPnizhV5cVU5qQyA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Ftimols%2Fjenkins-gitlab-merge-request-builder-plugin%2Fissues%2F88\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFyKmeQDxbwOgsPnizhV5cVU5qQyA&#39;;return true;">https://github.com/timols/jenkins-gitlab-merge-request-builder-plugin/issues/88

Could you please have a look into the issue details and let me know if I am doing anything wrong here.

Many thanks in advance for your suggestions

Best Regards,
-Saurabh


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8ad537f4-33bc-43c0-a876-1cebe06dac4b%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Getting "Couldn't find any revision to build" error while using Jenkins with BitBucket repository

Mark Waite-2


On Wed, Feb 12, 2020 at 7:43 AM Amila Gunathilake <[hidden email]> wrote:

Capture.PNG

Hi Mr. Mark Waite,

I'm getting a same kind of issue when I created a Checkout stage with "refspec" and due to that my Pull request is failing, I cannot merge this in to my master branch.


I don't see an obvious error in what you're trying, though I see some areas where it seems more complex than necessary.

For simplicity, try removing the refspec definition to see if that resolves the issue.  You might also try to remove the shallow clone to see if that helps with the issue.  You might also try using the branch name explicitly rather than using ${env.BRANCH_NAME}.
 
Below is my checkout stage code for your reference. 



On Friday, January 6, 2017 at 4:53:37 PM UTC-5, Saurabh Saxena wrote:
Hi All,

I am new to Jenkins and need your help with one of the error I am getting.

I have my local Jenkins setup with Tomcat, and have integrated it with BitBucket (Open Source) repository. While executing the build process I am getting the following error:

C:\Tools\PortableGit\git-bash.exe fetch --tags https://ssaxena007@.../ssaxena007/sk-test.git refs/remotes/origin/develop
Seen 0 remote branches
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

I googled the error however could not find any satisfactory answer to solve the issue.

Below are the details of my environment:

OS - Windows 7
Jenkins Version - 2.32.1 - Deployed locally on my machine with Tomcat 7.x
SCM Used - A private BitBucket repository from BitBucket.org
JDK - 1.8
Maven - 3.3.9
Git Client Used - gitbash.exe

Following are some of the links which I tried with no luck.

https://issues.jenkins-ci.org/browse/JENKINS-20502
https://issues.jenkins-ci.org/browse/JENKINS-35340
https://github.com/janinko/ghprb/issues/347
https://github.com/timols/jenkins-gitlab-merge-request-builder-plugin/issues/88

Could you please have a look into the issue details and let me know if I am doing anything wrong here.

Many thanks in advance for your suggestions

Best Regards,
-Saurabh


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8ad537f4-33bc-43c0-a876-1cebe06dac4b%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEQb0OWbdfKB9L0drwhwweu-3%3DNnMuTjNCAGo505wOT6Q%40mail.gmail.com.