title: Jenkins SSH issue on Mac OS X installed by homebrew
body: <p>I installed Jenkins CI from homebrew (<code>brew install jenkins</code>). So, it runs under my own user. Everything works fine except for SSH access to my Git repository. I do not want to create a separate user (e.g. jenkins) to run Jenkins and create separate SSH keys for it. I just want to use my own SSH keys. Accessing my remote git repo on the command-line works fine with my ssh keys, but in Jenkins it does not work. It gives a 'Permission denied (publickey)' error (username and project are obfuscated (<code>&lt;user&gt;</code> and <code>&lt;project&gt;</code>)): </p>
  
  <pre><code>Started by user anonymous
  Checkout:workspace / /Users/&lt;user&gt;/.jenkins/jobs/&lt;project&gt;_run_tests/workspace - hudson.remoting.LocalChannel@456d3d51
  Using strategy: Default
  Last Built Revision: Revision 093f1641f26632afd1a74c14276ec544356c1d08 (origin/dev)
  Checkout:workspace / /Users/&lt;user&gt;/.jenkins/jobs/&lt;project&gt;_run_tests/workspace - hudson.remoting.LocalChannel@456d3d51
  Fetching changes from 1 remote Git repository
  Fetching upstream changes from ssh://git@bitbucket.org/&lt;user&gt;/&lt;project&gt;.git
  ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
  ERROR:  (Underlying report) : Error performing command: /usr/local/bin/git fetch -t ssh://git@bitbucket.org/&lt;user&gt;/&lt;project&gt;.git +refs/heads/*:refs/remotes/origin/*
  Command "/usr/local/bin/git fetch -t ssh://git@bitbucket.org/&lt;user&gt;/&lt;project&gt;.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: Permission denied (publickey).
  fatal: The remote end hung up unexpectedly
  
  ERROR: Could not fetch from any repository
  FATAL: Could not fetch from any repository
  hudson.plugins.git.GitException: Could not fetch from any repository
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1012)
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:972)
      at hudson.FilePath.act(FilePath.java:783)
      at hudson.FilePath.act(FilePath.java:765)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:972)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:568)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:457)
      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:230)
  </code></pre>
  
  <p>It seems it is not using my ssh keys to connect to the git server. I tried adding a UserName key to the jenkins launchagent plist, did a restart, but no effect.</p>
  
  <p>How can I make jenkins use my SSH keys to connect to my remote git repo?</p>