title: Git always prompts "Are you sure you want to continue connecting (yes/no/[fingerprint])?"
body: <p>I have ssh setup in <code>~/.config/ssh</code> instead of the default <code>~/.ssh</code>.</p>
  <p>Every time I do a <code>git pull</code> or <code>git push</code>, I get the below message:</p>
  <pre><code>The authenticity of host 'github.com (192.30.255.112)' can't be established.
  RSA key fingerprint is SHA256:....
  Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
  Failed to add the host to the list of known hosts (/Users/username/.ssh/known_hosts).
  </code></pre>
  <p>After entering <em>yes</em>, the next step of adding the host to the <code>known_hosts</code> fails, but the operation (<code>git pull</code> and <code>git push</code>) completes successfully.</p>
  <p>There is no <code>~/.ssh</code> (and thereby no <code>~/.ssh/known_hosts</code>) after the operation completes.</p>
  <p>The location of my known hosts file is: <code>~/.config/ssh/known_hosts</code>.</p>
  <p>I have already done:</p>
  <pre><code>ssh -o UserKnownHostsFile=~/.config/ssh/known_hosts -T git@github.com
  </code></pre>
  <p><strong>and</strong></p>
  <pre><code>eval $(ssh-agent)
  ssh-add -K ~/.config/ssh/id_rsa
  </code></pre>
  <p>and also added the SSH keys to my github profile using <code>pbcopy &lt; ~/.config/ssh/id_rsa.pub</code>.</p>
  <p>Contents of <code>~/.config/ssh/config</code>:</p>
  <pre><code>Host *
    AddKeysToAgent yes
    UseKeychain yes
    IdentityFile ~/.config/ssh/id_rsa
  </code></pre>
  <p>Contents of <code>~/.config/ssh/known_hosts</code>:</p>
  <pre><code>github.com,192.30.255.112 ssh-rsa ...
  ...
  ...==
  192.30.255.113 ssh-rsa ...
  ...
  ...==
  </code></pre>
  <p>File permissions of <code>~/.config/ssh</code>:</p>
  <pre><code>drwxr-xr-x  6 username  staff   192 Aug 29 19:12 .
  drwxr-xr-x  7 username  staff   224 Aug 29 16:17 ..
  -rw-r--r--  1 username  staff    83 Aug 29 19:01 config
  -rw-------  1 username  staff  3434 Aug 29 19:00 id_rsa
  -rw-r--r--  1 username  staff   747 Aug 29 19:00 id_rsa.pub
  -rw-r--r--  1 username  staff   803 Aug 29 19:31 known_hosts
  </code></pre>
  <p><strong>EDIT</strong>:</p>
  <p>Doing <code>ssh -o UserKnownHostsFile=$HOME/.config/ssh/known_hosts git@github.com</code> gives:</p>
  <pre><code>git@github.com: Permission denied (publickey)
  </code></pre>
  <p>How do I avoid entering 'yes' at every <code>git pull</code> and <code>git push</code> ?</p>