title: How to Clone a private repository of github organization in a Jenkins Job
body: <p>I am the owner of github organization and I have access to all repositories. Some of them are private and others are public. I am trying to set up Jenkins to trigger builds when a pull request is made to any repository of the organization. The problem is that i have an external system which is notified via github webhooks whenever a pull request is made.  I have to integrate Jenkins with this system which is a requirement.  This system can also trigger notifications to Jenkins via api requests.  (<a href="https://python-jenkins.readthedocs.org/en/latest/examples.html" rel="nofollow">https://python-jenkins.readthedocs.org/en/latest/examples.html</a>)</p>
  
  <p>I could see that all solutions to automatic Jenkins build triggers are related to github plugin of Jenkins. (<a href="https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin" rel="nofollow">https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin</a>). I can't currently use it because i have an additional indirection with a new system in between github and Jenkins.</p>
  
  <p>Currently when my system receives notification from github, it issues api request to build job with repository name and branch. Now, the jenkins job executes a shell script that does a git clone of the repository and run tests.  I couldn't find a way to do a git clone of private repository of a organization. </p>
  
  <p>Requirements</p>
  
  <ol>
  <li><p>Jenkins build Console output is public and hence login related information should not be present inside the output.</p></li>
  <li><p>Jenkins is built for entire organization and hence I don't want to add the ssh key to my github account.</p></li>
  </ol>
  
  <p>What is the best/cleaner way to accomplish it?</p>