2 @heading=Root Certificate
5 <!-- This file is preprocessed by cgi/html.cgi -->
10 <p>This site provides https support in order to support the Git smart HTTP
13 <p>This obviously requires this site to have an SSL server certificate. In order
14 to avoid the hassle (and the cost) of getting an SSL server certificate that
15 has been signed by a root certificate already included (and trusted) by your
16 browser, this site uses its own root certificate.
</p>
18 <p>Git version
1.8.5 and later can quickly and easily be configured (see the
19 “Quick Setup
” section below) to use this root certificate ONLY
20 for connections to @@base(httpspushurl)@@. This configuration is the equivalent
21 of answering
“yes
” to the ssh
“Are you sure you want to
22 continue connecting?
” prompt when you first connect to a new ssh server.
</p>
24 <p>The root certificate for this site (@@base(httpspushurl)@@) is available from:
</p>
26 <a href=
"@@path(webadmurl)@@/@@nickname@@_root_cert.pem">@@server(webadmurl)@@/@@nickname@@_root_cert.pem
</a>
28 md5:
<tt>@@md5(@@nickname@@_root_cert.pem)@@
</tt>
30 sha1:
<tt>@@sha1(@@nickname@@_root_cert.pem)@@
</tt>
32 blob:
<tt>@@blob(@@nickname@@_root_cert.pem)@@
</tt>
35 <p>See also the
<a href=
"@@path(htmlurl)@@/httpspush.html">full instructions on configuring your Git client for https push
</a>.
</p>
37 <p>For information on how to push to the mob branch using https see
<a href=
"@@path(htmlurl)@@/mob.html#httpsmobpush">here
</a>.
</p>
41 <h2 id=
"quick">Quick Setup
</h2>
43 <p>These instructions require Git version
1.8.5 or later.
</p>
44 <p>The following shell commands (which can be copied and pasted into a terminal window)
45 will download the root certificate to
<tt>~/certs/@@nickname@@_root_cert.pem
</tt>
46 using
<tt>curl
</tt> and then configure Git to use it ONLY for connections to @@base(httpspushurl)@@.
</p>
50 curl -kO @@base(httpspushurl)@@/@@nickname@@_root_cert.pem
51 git config --global http.@@base(httpspushurl)@@.sslCAInfo \
52 ~/certs/@@nickname@@_root_cert.pem
53 git hash-object ~/certs/@@nickname@@_root_cert.pem
55 <p>Verify that the hash value output by
<tt>git hash-object
</tt> matches
56 the
“blob:
” hash value shown at the top of this page.
</p>
59 <h2 id=
"details">Details
</h2>
61 <p>A side effect of using an unrecognized root certificate is that Git may
62 complain with an error such as:
</p>
64 <tt>error: server certificate verification failed
</tt>
67 <p>To see this error in action, simply execute this git command:
</p>
69 git ls-remote @@httpspushurl@@/girocco.git
72 <p>Instead of downloading the server
’s root certificate, server certificate verification may be disabled with one of these techniques:
</p>
75 <li>Set the
<tt>GIT_SSL_NO_VERIFY
</tt> environment variable like so:
77 GIT_SSL_NO_VERIFY=
1 git ls-remote @@httpspushurl@@/girocco.git
80 <li>Temporarily set the git configuration variable
<tt>http.sslVerify
</tt> like so:
82 git -c http.sslVerify=false \
83 ls-remote @@httpspushurl@@/girocco.git
85 <p>Note that the
<tt>-c
</tt> option requires Git version
1.7.2 or later.
</p></li>
88 <p>Or, after downloading the root certificate for this site, the error may be
89 avoided through various methods by specifying the root certificate.
<br />
90 For each of these methods, the root certificate will be assumed to be downloaded
91 and saved to the file
<tt>$HOME/certs/@@nickname@@_root_cert.pem
</tt>.
</p>
93 <p id=
"git185">Using Git version
1.8.5 or later (recommended):
</p>
96 <li>Configure the global
<tt>http.sslCAInfo
</tt> variable but only for this site like so:
98 git config --global http.@@base(httpspushurl)@@.sslCAInfo \
99 $HOME/certs/@@nickname@@_root_cert.pem
101 <p>Note that this technique requires Git version
1.8.5 or later on the client but has the advantage of only needing to be done once.
</p></li>
104 <p>Using any version of Git:
</p>
107 <li>Set the
<tt>GIT_SSL_CAINFO
</tt> environment variable before running git like so:
109 GIT_SSL_CAINFO=$HOME/certs/@@nickname@@_root_cert.pem \
110 git ls-remote @@httpspushurl@@/girocco.git
113 <li>Temporarily set the git configuration variable
<tt>http.sslCAInfo
</tt> like so:
115 git -c http.sslCAInfo=$HOME/certs/@@nickname@@_root_cert.pem \
116 ls-remote @@httpspushurl@@/girocco.git
119 <li>Configure the git
<tt>http.sslCAInfo
</tt> variable like so:
121 git config http.sslCAInfo $HOME/certs/@@nickname@@_root_cert.pem
123 <p>Note that this technique works best after the repository has already been cloned
124 or initialized.
</p></li>
127 <p>For further details see the
<tt>git help config
</tt> output.
</p>