GIT - clean checkout fails [message #1058291] |
Mon, 13 May 2013 13:28 |
k z Messages: 71 Registered: October 2012 |
Member |
|
|
Hi,
Hudson: 3.0.1-b2
Hudson GIT plugin: 2.2.1-h-1
GIT: 1.8.2
Im building GIT project on slave. When a job workspace dir is empty (either I clean it manually via workspace wipe out button or use Git plugin configuration option "Wipe out workspace before build")the build crashes on checkout. After that, on the filesystem I have only one folder .git. It contains standard git folders (but empty) and two files HEAD and config. HEAD contains
However, if I run the build again on that folder, the files will be checked out successfully. The problem occures only when the workspace is empty. HEAD content after successfull checkout
b9f5b15f0760d26543ba208d536a2f0c75b94237
Log after 1st attempt (empty workspace - build failed)
Started by user <MyUser>
Building remotely on punt
Checkout:test_git / /hudson/workspace/test_git - hudson.remoting.Channel@3e8eae1e:punt
Using strategy: Default
Last Built Revision: Revision b9f5b15f0760d26543ba208d536a2f0c75b94237 (origin/master)
Checkout:test_git / /hudson/workspace/test_git - hudson.remoting.LocalChannel@1a254ec
Cloning the remote Git repository
Cloning repository origin
ERROR: Error cloning remote repo 'origin' : Could not clone <MyGitRepo>
ERROR: Cause: Exception caught during execution of fetch command
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:957)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:889)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2052)
at hudson.remoting.UserRequest.perform(UserRequest.java:107)
at hudson.remoting.UserRequest.perform(UserRequest.java:41)
at hudson.remoting.Request$2.run(Request.java:276)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
Log after 2nd attempt (workspace remains after 1st attempt - build successful)
Started by user <MyUser>
Building remotely on punt
Checkout:test_git / /hudson/workspace/test_git - hudson.remoting.Channel@3e8eae1e:punt
Using strategy: Default
Last Built Revision: Revision b9f5b15f0760d26543ba208d536a2f0c75b94237 (origin/master)
Checkout:test_git / /hudson/workspace/test_git - hudson.remoting.LocalChannel@1a254ec
Fetching changes from the remote Git repository
Fetching upstream changes from <MyGitRepo>
Commencing build of Revision b9f5b15f0760d26543ba208d536a2f0c75b94237 (origin/master)
Checking out Revision b9f5b15f0760d26543ba208d536a2f0c75b94237 (origin/master)
[DEBUG] Skipping watched dependency update; build not configured with trigger: test_git #138
Finished: SUCCESS
The problem is always reproducible.
[Updated on: Mon, 13 May 2013 13:30] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Re: GIT - clean checkout fails [message #1059036 is a reply to message #1058971] |
Thu, 16 May 2013 11:15 |
k z Messages: 71 Registered: October 2012 |
Member |
|
|
Great! Thank to the full stack trace we can identify the problem, btw why it is not always enabled? It looks like there is a problem with authorization on the first attemp. I keep repo credentials in .netrc file. So what is the problem?
Clean checkout
Started by user zapalak
Building remotely on punt
Checkout:test-git / /hudson2/workspace/test-git - hudson.remoting.Channel@37dd0b4c:punt
Using strategy: Default
Last Built Revision: Revision 27964cc90aad85d37cc6379c89cc4eb6467ceb1e (origin/master)
Checkout:test-git / /hudson2/workspace/test-git - hudson.remoting.LocalChannel@32b6481e
Cloning the remote Git repository
Cloning repository origin
ERROR: Error cloning remote repo 'origin' : Could not clone https://<MyGitRepo>/SeeingAssistant/SeeingAssistant-Routes
hudson.plugins.git.GitException: Could not clone https://<MyGitRepo>/SeeingAssistant/SeeingAssistant-Routes
at hudson.plugins.git.GitAPI.clone(GitAPI.java:234)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:942)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:889)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2052)
at hudson.remoting.UserRequest.perform(UserRequest.java:107)
at hudson.remoting.UserRequest.perform(UserRequest.java:41)
at hudson.remoting.Request$2.run(Request.java:276)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of fetch command
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:145)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:174)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:118)
at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:224)
at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:218)
at hudson.FilePath.act(FilePath.java:791)
at hudson.FilePath.act(FilePath.java:773)
at hudson.plugins.git.GitAPI.clone(GitAPI.java:218)
... 12 more
Caused by: org.eclipse.jgit.errors.TransportException: https://<MyGitRepo>/SeeingAssistant/SeeingAssistant-Routes: not authorized
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:446)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:276)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:127)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:113)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1062)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:136)
... 19 more
ERROR: Cause: Exception caught during execution of fetch command
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:958)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:889)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2052)
at hudson.remoting.UserRequest.perform(UserRequest.java:107)
at hudson.remoting.UserRequest.perform(UserRequest.java:41)
at hudson.remoting.Request$2.run(Request.java:276)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
2nd attempt
Started by user zapalak
Building remotely on punt
Checkout:test-git / /hudson2/workspace/test-git - hudson.remoting.Channel@37dd0b4c:punt
Using strategy: Default
Last Built Revision: Revision 27964cc90aad85d37cc6379c89cc4eb6467ceb1e (origin/master)
Checkout:test-git / /hudson2/workspace/test-git - hudson.remoting.LocalChannel@32b6481e
Fetching changes from the remote Git repository
Fetching upstream changes from https://<MyGitRepo>/SeeingAssistant/SeeingAssistant-Routes
Commencing build of Revision 27964cc90aad85d37cc6379c89cc4eb6467ceb1e (origin/master)
Checking out Revision 27964cc90aad85d37cc6379c89cc4eb6467ceb1e (origin/master)
Notifying upstream projects of job completion
[DEBUG] Skipping watched dependency update; build not configured with trigger: test-git #8
Finished: SUCCESS
git version
punt:~ builder$ git --version
git version 1.8.2
global config
punt:~ builder$ cat .gitconfig
[user]
email=ttbuildserver@gmail.com
name=builder
[Updated on: Thu, 16 May 2013 11:16] Report message to a moderator
|
|
|
|
|
|
|
|
Re: GIT - clean checkout fails [message #1480775 is a reply to message #1171685] |
Thu, 20 November 2014 13:21 |
Nimi Sukumaran Messages: 35 Registered: August 2013 Location: Bangalore |
Member |
|
|
Hi I am also facing the same problem
First time git clone is failing and second time its working fine.
Hudson version I am using is 3.2.1 and git version is 1.8.5.2
Git plugin version is 2.2.8.
Do we have any permanent fix for this ? Or do I need to do the modification in the known_hosts file?
Thanks in advance for the help!!
Error I am getting is :
Cloning the remote Git repository
Cloning repository origin
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not clone git@server:test.git
at hudson.plugins.git.GitAPI.clone(GitAPI.java:255)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1063)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1008)
at hudson.FilePath.act(FilePath.java:793)
at hudson.FilePath.act(FilePath.java:775)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:1008)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:777)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1550)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:607)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:518)
at hudson.model.Run.run(Run.java:1493)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:82)
at hudson.model.Executor.run(Executor.java:137)
Caused by: hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.TransportException: git@server:test.git: UnknownHostKey: server. RSA key fingerprint is 62:ad:32:1a:da:52:4c:41:a4:d8:c0:a8:0b:80:c3:d3
at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:248)
at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:235)
at hudson.FilePath.act(FilePath.java:793)
at hudson.FilePath.act(FilePath.java:775)
at hudson.plugins.git.GitAPI.clone(GitAPI.java:235)
... 13 more
Caused by: org.eclipse.jgit.api.errors.TransportException: git@server:test.git: UnknownHostKey: server. RSA key fingerprint is 62:ad:32:1a:da:52:4c:41:a4:d8:c0:a8:0b:80:c3:d3
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:178)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:125)
at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:242)
... 17 more
Caused by: org.eclipse.jgit.errors.TransportException: git@server:test.git: UnknownHostKey: server. RSA key fingerprint is 62:ad:32:1a:da:52:4c:41:a4:d8:c0:a8:0b:80:c3:d3
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:142)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1111)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
... 20 more
Caused by: com.jcraft.jsch.JSchException: UnknownHostKey: server. RSA key fingerprint is 62:ad:32:1a:da:52:4c:41:a4:d8:c0:a8:0b:80:c3:d3
at com.jcraft.jsch.Session.checkHost(Session.java:786)
at com.jcraft.jsch.Session.connect(Session.java:342)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)
... 27 more
Trying next repository
FATAL: Could not clone repository
hudson.plugins.git.GitException: Could not clone repository
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1074)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1008)
at hudson.FilePath.act(FilePath.java:793)
at hudson.FilePath.act(FilePath.java:775)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:1008)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:777)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1550)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:607)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:518)
at hudson.model.Run.run(Run.java:1493)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:82)
at hudson.model.Executor.run(Executor.java:137)
[Updated on: Thu, 20 November 2014 13:44] Report message to a moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07219 seconds