{"id":316,"date":"2023-06-21T16:20:23","date_gmt":"2023-06-21T21:20:23","guid":{"rendered":"http:\/\/myblog.vindaloo.com\/?p=316"},"modified":"2023-10-07T11:58:48","modified_gmt":"2023-10-07T15:58:48","slug":"on-freebsd-git-cant-find-the-certificate-store","status":"publish","type":"post","link":"http:\/\/myblog.vindaloo.com\/?p=316","title":{"rendered":"On FreeBSD, git can&#8217;t find the certificate store"},"content":{"rendered":"\n<p>When I was playing with git checkout of modules I discovered that git  doesn&#8217;t know how to set the certificate store for curl when it tries to retrieves a module via https. In general, I don&#8217;t recommend using git with https unless you have to. Using git+ssh obviates away a bucket of authentication issues. In this case, https is the better choice. To tell git where to look for certificates, to verify and https website, I had to add the following to my <code>~\/.gitconfig<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;http]\nsslCApath=\/etc\/ssl\/certs<\/code><\/pre>\n\n\n\n<p>The command that does this is: <code>git config --global http.sslCAPath \"\/etc\/ssl\/certs\".<\/code> If your operating system uses a CA file rather than a CA directory this is the setting: <code>git config --global http.sslCAInfo \"\/etc\/ssl\/cert.pem\".<\/code> You can also make this work by setting an environment variable for curl in <code>\/etc\/profile<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Mirroring in Gitlab<\/h2>\n\n\n\n<p>I normally strongly prefer <code>git+ssh<\/code> over <code>git+https<\/code>. If you are mirroring between two gitlab-ce instances over git+https, you can handle your mirroring with a single authentication token.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I was playing with git checkout of modules I discovered that git doesn&#8217;t know how to set the certificate store for curl when it tries to retrieves a module via https. In general, I don&#8217;t recommend using git with https unless you have to. Using git+ssh obviates away a bucket of authentication issues. In &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/myblog.vindaloo.com\/?p=316\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;On FreeBSD, git can&#8217;t find the certificate store&#8221;<\/span><\/a><\/p>\n","protected":false},"author":54,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,7,9],"tags":[],"class_list":["post-316","post","type-post","status-publish","format-standard","hentry","category-development","category-freebsd","category-open-source"],"_links":{"self":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/users\/54"}],"replies":[{"embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=316"}],"version-history":[{"count":4,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":344,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts\/316\/revisions\/344"}],"wp:attachment":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}