If you hit the Customize button in Jenkins installer, you can choose to create 
a new user, jenkins, and it will have a writable home directory.

-- Sami

Dat Nguyen <[email protected]> kirjoitti 26.1.2012 kello 1.06:

> I think I know what the problem is. Jankins is started by daemon, and
> that's the reason why it is looking for rsa key of root user. I shut
> down Jankins, remove the auto-start script in /Library/LaunchDaemons,
> and start Jankins by my user. Then I can clone the repository with no
> problem.
> Dat
> 
> On Jan 25, 11:14 am, Dat Nguyen <[email protected]> wrote:
>> Dear all,
>> I have a Mac computer with gitolite as the git management. I try to
>> clone git from Jenkins and have errors (see below).
>> I've added an user with name 'hudson', and added his rsa key to the
>> gitolite's keydir folder (and was able to run Jenkins' clone command
>> with no problem), but still have the same error. It's saying something
>> about "Could not create directory '/var/root/.ssh'.", which I don't
>> understand why Jenkins is trying to be root.
>> Any help will be appreciated.
>> Thanks,
>> Dat
>> 
>> ====
>> 
>> Started by user anonymous
>> Building in workspace /Users/Shared/Jenkins/Home/jobs/iPadDemo/
>> workspace
>> Checkout:workspace / /Users/Shared/Jenkins/Home/jobs/iPadDemo/
>> workspace - hudson.remoting.LocalChannel@58773ac1
>> Using strategy: Default
>> Checkout:workspace / /Users/Shared/Jenkins/Home/jobs/iPadDemo/
>> workspace - hudson.remoting.LocalChannel@58773ac1
>> Cloning the remote Git repository
>> Cloning repository origin
>> ERROR: Error cloning remote repo 'origin' : Could not clone
>> git@localhost:iPadDemo -b development
>> hudson.plugins.git.GitException: Could not clone
>> git@localhost:iPadDemo -b development
>>         at hudson.plugins.git.GitAPI.clone(GitAPI.java:245)
>>         at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1029)
>>         at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:970)
>>         at hudson.FilePath.act(FilePath.java:784)
>>         at hudson.FilePath.act(FilePath.java:766)
>>         at hudson.plugins.git.GitSCM.checkout(GitSCM.java:970)
>>         at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
>>         at hudson.model.AbstractBuild
>> $AbstractRunner.checkout(AbstractBuild.java:576)
>>         at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:
>> 465)
>>         at hudson.model.Run.run(Run.java:1404)
>>         at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
>>         at hudson.model.ResourceController.execute(ResourceController.java:
>> 88)
>>         at hudson.model.Executor.run(Executor.java:238)
>> Caused by: hudson.plugins.git.GitException: Error performing command: /
>> usr/bin/git clone --progress -o origin git@localhost:iPadDemo -b
>> development /Users/Shared/Jenkins/Home/jobs/iPadDemo/workspace
>> Command "/usr/bin/git clone --progress -o origin
>> git@localhost:iPadDemo -b development /Users/Shared/Jenkins/Home/jobs/
>> iPadDemo/workspace" returned status code 128: Cloning into /Users/
>> Shared/Jenkins/Home/jobs/iPadDemo/workspace...
>> Could not create directory '/var/root/.ssh'.
>> Host key verification failed.
>> fatal: The remote end hung up unexpectedly
>> 
>>         at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:776)
>>         at hudson.plugins.git.GitAPI.access$000(GitAPI.java:38)
>>         at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:241)
>>         at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:221)
>>         at hudson.FilePath.act(FilePath.java:784)
>>         at hudson.FilePath.act(FilePath.java:766)
>>         at hudson.plugins.git.GitAPI.clone(GitAPI.java:221)
>>         ... 12 more
>> Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git
>> clone --progress -o origin git@localhost:iPadDemo -b development /
>> Users/Shared/Jenkins/Home/jobs/iPadDemo/workspace" returned status
>> code 128: Cloning into /Users/Shared/Jenkins/Home/jobs/iPadDemo/
>> workspace...
>> Could not create directory '/var/root/.ssh'.
>> Host key verification failed.
>> fatal: The remote end hung up unexpectedly
>> 
>>         at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:771)
>>         ... 18 more
>> Trying next repository
>> ERROR: Could not clone repository
>> FATAL: Could not clone
>> hudson.plugins.git.GitException: Could not clone
>>         at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1041)
>>         at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:970)
>>         at hudson.FilePath.act(FilePath.java:784)
>>         at hudson.FilePath.act(FilePath.java:766)
>>         at hudson.plugins.git.GitSCM.checkout(GitSCM.java:970)
>>         at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
>>         at hudson.model.AbstractBuild
>> $AbstractRunner.checkout(AbstractBuild.java:576)
>>         at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:
>> 465)
>>         at hudson.model.Run.run(Run.java:1404)
>>         at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
>>         at hudson.model.ResourceController.execute(ResourceController.java:
>> 88)
>>         at hudson.model.Executor.run(Executor.java:238)

Reply via email to