Reputation: 7145
Scenario
xcode7
and xcode2
) running the exact same instance of Mac OS X El Capitan and both with the same build tools (Xcode 7.3).superbuilder
is a user exists on both build slaves and has matching private keys and public keys on both machines.xcode2
) can clone our repo and the other (xcode7
) can't because git init
fails with status code 1:
(see stack trace below).Versions of things
1.580.1
1.13.3
1.9
2.6.4 (Apple Git-63)
What have I tried on xcode7
superbuilder
user has the exact same public, private keys and known hosts as it does on xcode2
.xcode7
directly and calling the exact same git clone commands locally. This succeeds and I am able to manually clone the repo.git
binary is available is visible to the superbuilder
on its $PATH.buildmaster
has read/write/execute permissions on the jenkins workspace directory.DEVELOPER_DIR
is injected an environment variable and points at /Applications/Xcode
Questions
xcrun error
relevant? By that I mean is that the source of my problem or is it something else?status code 1
refer to?git init
fail when run through the Jenkins SSH Slave Plugin?Stack Trace from Jenkins Build Job
[EnvInject] - Mask passwords passed as build parameters.
Started by user anonymous
[EnvInject] - Loading node environment variables.
Building remotely on xcode7-xcode (xcode7) in workspace /var/jenkins/workspace/mobile.iphone-app-xcode7.ci
Cloning the remote Git repository
Cloning repository [email protected]:mobile/iphone-app.git
> git init /var/jenkins/workspace/mobile.iphone-app-xcode7.ci # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init /var/jenkins/workspace/mobile.iphone-app-xcode7.ci
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:656)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:463)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:324)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to xcode7-xcode(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
at hudson.remoting.Channel.call(Channel.java:752)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
at com.sun.proxy.$Proxy81.execute(Unknown Source)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1057)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
at hudson.scm.SCM.checkout(SCM.java:488)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1253)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
at hudson.model.Run.execute(Run.java:1745)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Caused by: hudson.plugins.git.GitException: Command "git init /var/jenkins/workspace/mobile.iphone-app-xcode7.ci" returned status code 1:
stdout:
stderr: xcrun: error: missing DEVELOPER_DIR path: /Applications/Xcode
...
Upvotes: 2
Views: 5355
Reputation: 17262
The error that it's complaining about is error: missing DEVELOPER_DIR path: /Applications/Xcode
. Is that variable set on both machines? Is is the same on both machines? Does the directory exist and contain the same thing on both machines?
Upvotes: 1
Reputation: 468
I hope update Jenkins to newest version helps
This bug found and fixed at Jenkins 1.509.4
I Think you can try to create remote working dir manual and run this command from console. This will be some kind of workaround
Upvotes: 1