Paul Martin
2016-04-30 a502d96a860456ec5e8c96761db70f7cabb74751
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
********************************************************************************
 Gitblit SSL Client Certificate for $serverHostname
********************************************************************************
 
 Hello $userDisplayname,
 
 Your private key, public certificate, and the Gitblit Certificate Authority 
 certificate for $serverHostname are stored in $username.p12, a PKCS#12 certificate
 store[1], and also in $username.pem, a PEM certificate store.
 
 Both of these certificate stores are password-protected. 
 Password Hint: $storePasswordHint
 
 
Git (All) Installation Instructions
=============================================
 
 The provided PEM file can be directly used by your git client.
 
    git config [--global] http.sslCert path/to/$username.pem
    
 The supplied PEM file is password-protected and you may be prompted for your
 password multiple times during an exchange with Gitblit.  If you desire a
 password-less git client workflow then you will need to decrypt and export your
 private key with OpenSSL[2] and then update your git config to use that key.
 
    openssl rsa -in path/to/$username.pem -out path/to/$username.key    
    git config [--global] http.sslKey path/to/$username.key
 
 Obviously, you should protect access to any decrypted private key.
 
 NOTE:
 Some older git clients may have trouble using the PEM file without explicitly
 extracting the private key.  This has been observed, for example, on Ubuntu 12.04
 with git 1.7.9.5.
 
 
Firefox (All) Installation Instructions
=============================================
 
 Firefox maintains it's own certificate store which is separate from the operating
 system.
 
 1. Navigate to Options->Advanced->Encryption
 2. Click "View Certificates"
 3. Switch to the "Your Certificates" tab
 4. Click "Import..."
 5. Navigate your filesystem and select $username.p12
 6. At the password prompt enter the certificate store password
    You have now imported your private key, public certificate, and the CA certificate
    but now we must manually set the trust settings of the CA certificate.
 7. Switch to the "Authorities" tab
 8. Scroll down and find "Gitblit-> Gitblit Certificate Authority"
 9. Select it and click "Edit Trust..."
 10. Check "This certificate can identify websites" and click OK.
 
 
Chrome/IE (Windows) Installation Instructions
=============================================
 
 On Windows, Chrome and IE share their certificate store so configuring one will
 automatically apply for both.
 
 IE
 ------------------------------------
 1. Navigate to Internet Options->Content
 2. Click the "Certificates" button
 
 Chrome
 ------------------------------------
 1. Navigate to Settings->Show Advanced Settings->HTTP/SSL
 2. Click the "Manage Certificates..." button
 
 Both (Windows)
 ------------------------------------
 3. Switch to the "Personal" tab
 4. Click the "Import..." button
 5. Follow the Import Wizard instructions.
    You will need to change the selected file filter when navigating to $username.p12
 6. At the password prompt enter the certificate store password
 7. Because both your personal certificate and the CA certifcate are stored in 
    $username.p12, you must choose "Automatically select the certificate store based on the type of certificate".
    If you choose the default you will not install the CA certificate.
 
 
Chrome (Linux) Installation Instructions
=============================================
 
 On Linux, Chrome maintains it's own certificate store.
 
 1. Navigate to Settings->Show Advanced Settings->HTTP/SSL
 2. Click the "Manage Certificates..." button
 3. Navigate your filesystem and select $username.p12
 4. At the password prompt enter the certificate store password
    You have now imported your private key, public certificate, and the CA certificate
    but now we must manually set the trust settings of the CA certificate.
 5. Switch to the "Authorities" tab
 6. Scroll down and find "Gitblit-> Gitblit Certificate Authority"
 7. Select it and click "Edit Trust..."
 8. Check "This certificate can identify websites" and click OK.
 
 
Chrome/Safari (Mac OS X) Installation Instructions
=============================================
 
On Mac OS X, Chrome and Safari both use Keychain Access to store certificates
so configuring one will automatically apply for both.
 
 1. Double-click $username.pem
 2. At the password prompt enter the certificate store password
    You have now imported your private key, public certificate, and the CA certificate
    but now we must manually set the trust settings of the CA certificate.
 3. Find the Gitblit Certificate Authority certificate, it should have a red
    indicator meaning untrusted, and double-click it.
 4. Open the "Trust" disclosure triangle and change "When using this certificate"
    to "Always Trust".
 5. Close the certificate view and enter your system password to save the changes
    to your keychain. 
  
    
[1] PKCS#12 is one of the standard container formats for sharing private keys and
    public certificates.
[2] http://www.openssl.org