title: GitHub integration with Jenkins
body: <p>There are multiple approaches in integrating Jenkins with GitHub</p>
  
  <p>Approach 1) Enable ssh communication between GitHub and Jenkins by copying public key file generated in Jenkins to GitHub account. This is one time task. </p>
  
  <p>For any pipeline take  any GitHub url(say <code>ssh://git@github.com/account/repo.git</code>) and add using Github plugin for that respective pipeline cocnfiguration</p>
  
  <p>So, Jenkins file just need to have <code>checkout SCM</code> to checkout</p>
  
  <p>Approach 2) Enable https communication by adding webhook for every new repo by generating token and enable https comunication between GitHub and Jenkins. But this approach should be repeated for every new repo created in GitHub.</p>
  
  <p>We are using GitHub repo... in production</p>
  
  <p>Which is the best practice of GitHub integration with Jenkins in production?</p>