Hudson 체크 아웃 문제를위한 GIT 플러그인
문제
Hudson 용 Git 플러그인을 사용할 때 온라인 git 저장소 (git : //github.com/ithena/orm2dsl.git)에서 최신 소스를 가져올 때 작업이 항상 실패합니다.
GIT 플러그인이 먼저 실행됩니다 git fetch
성공적으로. 그런 다음 실행하려고합니다 git checkout -f origin/
아래 그림과 같이 실패합니다. 이것은 문제입니다 내 git 저장소 아니면 이해가되지 않는 체크 아웃 명령입니까?
작업 구성에서 설정된 분기를 whithout git 명령 :
git checkout -f origin/
git checkout: updating paths is incompatible with switching branches/forcing
Did you intend to checkout 'origin/' which can not be resolved as commit?
작업 구성에서 마스터로 설정된 분기가있는 git 명령 :
git checkout -f origin/master
git checkout: updating paths is incompatible with switching branches/forcing
Did you intend to checkout 'origin/master' which can not be resolved as commit?
허드슨 콘솔 출력 :
started
Checkout
[workspace] $ git fetch
Checking out origin/
[workspace] $ git checkout -f origin/
git checkout: updating paths is incompatible with switching branches/forcing
Did you intend to checkout 'origin/' which can not be resolved as commit?
FATAL: Error checking out origin/
java.lang.RuntimeException: Error checking out origin/
at hudson.plugins.git.GitAPI.launch(GitAPI.java:101)
at hudson.plugins.git.GitAPI.checkout(GitAPI.java:94)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:90)
at hudson.model.AbstractProject.checkout(AbstractProject.java:693)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:266)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:239)
at hudson.model.Run.run(Run.java:842)
at hudson.model.Build.run(Build.java:88)
at hudson.model.ResourceController.execute(ResourceController.java:70)
at hudson.model.Executor.run(Executor.java:90)
허드슨 환경 : Debian Etch, Sun JSDK 6, Git 1.4.4.4, Hudson 최신 안정적인 다운로드
해결책
첫째, GIT 버전은 꽤 오래되었습니다. 다른 일을하기 전에 업데이트하는 것이 좋습니다.
초, git checkout -f origin/
유효한 명령이 아닙니다. 지점을 확인해야하거나 (커밋 해시 또는 태그를 지정하여) 커밋을 확인하고 동일한 곳에서 새 지점을 만들 수 있습니다. git checkout -b new-branch commit-hash
). 참조 Git-Checkout Man 페이지 자세한 내용은.
제휴하지 않습니다 StackOverflow