title: Can the macOS Git client use certificates stored in the user's Keychain?
body: <p>Our Git server is being changed to require a certificate/private key when accessed by Git clients.</p>
  
  <p>Our Windows users are instructed to import the certificate locally and then configure Git to use the <code>schannel</code> backed for SSL as in</p>
  
  <pre><code>git config --global http.sslBackend schannel
  </code></pre>
  
  <p>This will obviously not work for macOS users. Is there a way to do something similar with the Git client on macOS?</p>
  
  <p>I found that I can point to the certificate and private key in my Git config, if a) they are in separate files, and b) are in <code>.pem</code> format, like this:</p>
  
  <pre><code>git config --global http.sslCert /Users/.../cert.pem
  git config --global http.sslKey /Users/.../key.pem
  git config --global http.sslCertPasswordProtected true
  </code></pre>
  
  <p>After doing this, whenever I try to push/pull, the Git client asks about the password for the private key, like this:</p>
  
  <pre><code>$ git pull
  Password for 'cert:////Users/.../cert.pem': *********
  Already up to date.
  </code></pre>
  
  <p>Is there a way to tell the Git client (or the underlying <code>curl</code> client) to use the macOS Keychain for retrieving the certificate, the key and the also the key's passphrase?</p>
  
  <p>I know that newer versions of <code>curl</code> support the <code>-E/--cert</code> parameter to use the keychain, but I'm not sure whether that is available via the Git client.</p>