프로그래밍/Jenkins

[Jenkins] ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job. 해결하기

Beginner:) 2023. 5. 8.
320x100

ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job 에러가 출력되었다.

 

- Jenkins log

Started by user park
Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/build-gcc
The recommended git tool is: NONE
using credential park
Cloning the remote Git repository
Cloning repository http://gitlab.park-duck.world/developer_c/proj-test-c.git
 > git init /var/lib/jenkins/workspace/build-gcc # timeout=10
Fetching upstream changes from http://gitlab.park-duck.world/developer_c/proj-test-c.git
 > git --version # timeout=10
 > git --version # 'git version 2.17.1'
using GIT_ASKPASS to set credentials 
 > git fetch --tags --progress -- http://gitlab.park-duck.world/developer_c/proj-test-c.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url http://gitlab.park-duck.world/developer_c/proj-test-c.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
Avoid second fetch
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git 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가 처음이면 접할 법한 오류이다.

 

브랜치를 찾을 수 없다는 뜻인데.

 

프로젝트의 구성에 들어가면 branch 이름이 master가 디폴트로 되어있는데, Gitbug이나 Gitlab은 main이 디폴트이다.

브랜치 명만 맞춰주면 에러는 해결된다.

 

반응형

댓글