ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

9,655 views
Skip to first unread message

Kamalakannan Anandan

unread,
Feb 21, 2022, 9:04:44 PM2/21/22
to Jenkins Users
Hello Everyone, 

I am new to Jenkins need help with one of the error message. I am trying to Build project when a push operation is done on GitHub. Please help me to resolve the issue.

I just created a new project in the GitHub (JenkinsPractice)
Created a new  java program Hello world with Initial commit with the code. 
I am getting an error message in Jenkins. "ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job."

Please find the attached screenshot for the settings. 

Console Output
Started by GitHub push by kanandan12 Running as SYSTEM Building in workspace C:\Users\koush\.jenkins\workspace\GitSampleProject The recommended git tool is: NONE No credentials specified Cloning the remote Git repository Cloning repository https://github.com/kanandan12/JenkinsPractice.git > C:\Program Files\Git\bin\git.exe init C:\Users\koush\.jenkins\workspace\GitSampleProject # timeout=10 Fetching upstream changes from https://github.com/kanandan12/JenkinsPractice.git > C:\Program Files\Git\bin\git.exe --version # timeout=10 > git --version # 'git version 2.35.1.windows.2' > C:\Program Files\Git\bin\git.exe fetch --tags --force --progress -- https://github.com/kanandan12/JenkinsPractice.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > C:\Program Files\Git\bin\git.exe config remote.origin.url https://github.com/kanandan12/JenkinsPractice.git # timeout=10 > C:\Program Files\Git\bin\git.exe config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 Avoid second fetch > C:\Program Files\Git\bin\git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10 > C:\Program Files\Git\bin\git.exe rev-parse "origin/master^{commit}" # timeout=10 ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job. Finished: FAILURE 
Jenkins_ProjectSettings2.png
GitHub_Screenshots.jpg
Jenkins_ProjectSettings1.jpg

Thomas Markus

unread,
Feb 22, 2022, 12:46:18 AM2/22/22
to jenkins...@googlegroups.com
Hello,

Am 22.02.22 um 01:49 schrieb Kamalakannan Anandan:
> Hello Everyone,
>
> I am new to Jenkins need help with one of the error message. I am
> trying to Build project when a push operation is done on GitHub.
> Please help me to resolve the issue.
>
> I just created a new project in the GitHub (JenkinsPractice)
> Created a new  java program Hello world with Initial commit with the
> code.
> I am getting an error message in Jenkins. "ERROR: Couldn't find any
> revision to build. Verify the repository and branch configuration for
> this job."
this looks easy: you specified branch "master" in your jenkins build but
your repo has only branch "main"
Change "*/master" to "*/main" in branch specifier

best regards
Thomas

OpenPGP_0x9794716335E9B5AF.asc
OpenPGP_signature

Kamalakannan Anandan

unread,
Feb 22, 2022, 11:30:18 AM2/22/22
to jenkins...@googlegroups.com
Hi Thomas,

After changing /master to /main branch name issue got resolved.
Thanks for your help and support.


--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0ecbee54-5a08-54b2-ba5d-9af89d6b5206%40proventis.net.


--
Thanks and regards,
Kamalakannan Anandan
Reply all
Reply to author
Forward
0 new messages