title: Automated git pull on system boot on raspberry pi
body: <p>I'm using a raspberry pi zero with jessie lite installed and I want to pull from a github repository on system boot. 
  I have written a python script </p>
  
  <pre><code>os.system("(cd ~/Exchange/KneeJointMonitoring &amp;&amp; git pull)")
  </code></pre>
  
  <p>which works fine when executed manually. 
  For automation I have used rc.local, where I have added</p>
  
  <pre><code>sudo python /home/pi/Exchange/KneeJointMonitoring/AutoPull.py &amp;
  </code></pre>
  
  <p>which should also work, since another script (called after the above one) is started on boot. 
  I have also added a SSH key to github and added it on the raspberry pi following this (and the linked) tutorials for machine users:
  <a href="https://developer.github.com/v3/guides/managing-deploy-keys/" rel="nofollow noreferrer">https://developer.github.com/v3/guides/managing-deploy-keys/</a></p>
  
  <p>Afterwards, I ran </p>
  
  <pre><code>ssh -T git@github.com
  </code></pre>
  
  <p>which was successfully. 
  Anyways, my Pi is not pulling the repo in startup, what am I missing? Can somebody help? </p>