title: SSL: 'unable to get local issuer certificate'
body: <p>I am using OSX: 10.12.4</p>
  
  <p>I originally was able to use git, homebrew and curl without any problems. I don't remember what I did to cause it, but all of a sudden these SSL errors starting appearing in my git commands.</p>
  
  <p>I get <strong><code>unable to get local issuer certificate</code></strong> errors on running any git command. In addition, I get the error when trying to reinstall git using <code>brew install git</code>.</p>
  
  <p>The relevant part of <strong>brew output:</strong></p>
  
  <pre><code>Downloading https://www.kernel.org/pub/software/scm/git/git-2.12.2.tar.xz
  
  curl: (60) SSL certificate problem: unable to get local issuer certificate
  More details here: https://curl.haxx.se/docs/sslcerts.html
  </code></pre>
  
  <p><strong>I have tried:</strong></p>
  
  <ul>
  <li>Rebooting</li>
  <li>Moving the ~/Library/Keychains folder to ~/Desktop and then rebooting</li>
  <li>Navigating to <a href="https://www.kernel.org/pub/software/scm/git" rel="noreferrer">https://www.kernel.org/pub/software/scm/git</a> on safari, and 
  <a href="https://i.stack.imgur.com/8c1RI.png" rel="noreferrer">viewing the certificate</a>. According to [these instructions](cannot post more than 2 links, sorry), there should be a checkbox to "Always trust" the site. I do not see this checkbox.</li>
  <li>I was going to try keychain first aid, however, this feature has been removed in the most recent Mac OS.</li>
  <li>I tried looking through many other similar questions, however, with many, I had trouble understanding or following the instructions in the answers.</li>
  </ul>
  
  <p>For example, perhaps squid808's <a href="https://stackoverflow.com/questions/24871897/sourcetree-and-stash-unable-to-get-local-issuer-certificate">answer</a> to a similar question could help me. He says "Instead, it is the Root CA Cert from our domain that I should have been exporting and telling Git to trust." I have little understanding of what this means or if it is relevant to me, or how I would go about doing this. Based on my research it seems like this is more for people running servers. It also seems to be for windows, and I am on Mac.</p>
  
  <p>I understand that as a <strong>temporary</strong> fix I can use <code>git config --global http.sslVerify false</code> in addition to the <code>-k</code> option in curl. These workarounds are insecure, so I'd like to get my SSL security back up and running ASAP.</p>
  
  <p><strong>Output of</strong> <code>curl -L https://homebrew.bintray.com/bottles/libpng-1.6.29.sierra.bottle.tar.gz | bash -s stable</code> (part of a brew attempt that similarly fails)</p>
  
  <pre><code>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (60) SSL certificate problem: unable to get local issuer certificate
  More details here: https://curl.haxx.se/docs/sslcerts.html
  
  curl performs SSL certificate verification by default, using a "bundle"
   of Certificate Authority (CA) public keys (CA certs). If the default
   bundle file isn't adequate, you can specify an alternate file
   using the --cacert option.
  If this HTTPS server uses a certificate signed by a CA represented in
   the bundle, the certificate verification probably failed due to a
   problem with the certificate (it might be expired, or the name might
   not match the domain name in the URL).
  If you'd like to turn off curl's verification of the certificate, use
   the -k (or --insecure) option.
  </code></pre>
  
  <p><strong>Apologies</strong></p>
  
  <ul>
  <li>If the following attempts I've made to solve this seem scattered and disorganized, it is because I am confused if this is an issue more relevant to git, curl, or perhaps neither and just SSL certificates in general. Please let me know if the tags for this question should be fixed.</li>
  <li>I could have posted more relevant links and images, but I am limited by reputation.</li>
  </ul>
  
  <p>I have another account that I was not able to maintain a positive reputation on. I am trying to identify and fix everything I was doing wrong before. Any feedback on how I can improve the quality of this question would be much appreciated. Thank you.</p>