title: Intellij idea failing to push to github
body: <p>There're variations of this question on the internet, I've tried following the other questions answers but to no avail.</p>
  
  <p>The problem is basically whenever I try to push my changes to the repository at github I get the following error:
  "Permission denied (publickey).
  fatal: Could not read from remote repository.
  Please make sure you have the correct access rights
  and the repository exists."</p>
  
  <p>My ssh keys are ~/.ssh/github_rsa and github_rsa.pub.
  I have set a passphrase as well as a .bashrc file @ %userprofile%:</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 ~/.ssh/github_rsa
  elif [ "$SSH_AUTH_SOCK" ] &amp;&amp; [ $agent_run_state = 1 ]; then
      ssh-add ~/.ssh/github_rsa
  fi
  
  unset env
  </code></pre>
  
  <p>I also changed Intellij settings of ssh client to Native.
  Every operation works fine in git bash but no in Intellij.</p>