title: windows git bash on startup can't find agent.env
body: <pre><code>Windows 10
  Git for Windows 64 v2.13.0.windows.1
  </code></pre>
  
  <p>To config ssh with private-key passphrase I'm following this GitHub doc : </p>
  
  <p><a href="https://help.github.com/articles/working-with-ssh-key-passphrases/" rel="nofollow noreferrer">https://help.github.com/articles/working-with-ssh-key-passphrases/</a></p>
  
  <p>Specifically, I add to my <code>~/.ssh/.bashrc</code> the following script: </p>
  
  <pre><code>env=~/.ssh/agent.env
  
  agent_load_env () { test -f "$env" &amp;&amp; . "$env" &gt;| /dev/null ; }
  
  agent_start () {
      (umask 077; ssh-agent &gt;| "$env")
      . "$env" &gt;| /dev/null ; }
  
  agent_load_env
  
  # agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running
  agent_run_state=$(ssh-add -l &gt;| /dev/null 2&gt;&amp;1; echo $?)
  
  if [ ! "$SSH_AUTH_SOCK" ] || [ $agent_run_state = 2 ]; then
      agent_start
      ssh-add
  elif [ "$SSH_AUTH_SOCK" ] &amp;&amp; [ $agent_run_state = 1 ]; then
      ssh-add
  fi
  
  unset env
  </code></pre>
  
  <p>However when I start Git Bash it can't find <code>~/.ssh/agent.env</code> : </p>
  
  <pre><code>bash: env=~/.ssh/agent.env: No such file or directory
  bash: : No such file or directory
  bash: : No such file or directory
  Could not open a connection to your authentication agent.
  </code></pre>
  
  <p>What is <code>agent.env</code> and how is it typically installed or what should it contain ?</p>