title: how can I run the ssh-agent auto in the zsh environment?
body: <p>I use the zsh and the oh-my-zsh.
  When I use the github and want to use the key to upload.</p>
  
  <p>I always find the </p>
  
  <pre><code>#git push
  Permission denied (publickey).
  fatal: The remote end hung up unexpectedly
  </code></pre>
  
  <p>Because I have not add the key</p>
  
  <pre><code>#ssh-add -l
  Could not open a connection to your authentication agent.
  </code></pre>
  
  <p>so I have to start the ssh-agent and add the key when I want to push or pull</p>
  
  <pre><code>#ssh-agent zsh
  #ssh-add ~/.ssh/id_rsa
  </code></pre>
  
  <p>How can I add these command in the script,so I don't need type the commands?</p>