|
| 1 | +******************************************************************************** |
| 2 | + Gitblit 伺服器 $serverHostname 所需之 SSL 用戶端憑證 |
| 3 | +******************************************************************************** |
| 4 | + |
| 5 | + $userDisplayname 您好, |
| 6 | + |
| 7 | + 伺服器 $serverHostname 所需要的私鑰,公鑰以及Gitblit簽證檔案(CA)存放於 $username.p12, PKCS#12 certificate store[1] 以及 $username.pem. |
| 8 | + |
| 9 | + 兩種證書皆受密碼保護. |
| 10 | + 密碼提示: $storePasswordHint |
| 11 | + |
| 12 | + |
| 13 | +Git 憑證匯入步驟 |
| 14 | +============================================= |
| 15 | + |
| 16 | + 附件之 PEM 檔案可以直接匯入至您的git程式裡. |
| 17 | + |
| 18 | + git config [--global] http.sslCert path/to/$username.pem |
| 19 | + |
| 20 | + PEM檔案受密碼保護,因此匯入過程會提示多次. 如果您偏好不使用密碼,您需要另外匯出無密碼之私鑰後,再匯入git程式裡. |
| 21 | + |
| 22 | + openssl rsa -in path/to/$username.pem -out path/to/$username.key |
| 23 | + git config [--global] http.sslKey path/to/$username.key |
| 24 | + |
| 25 | + 此外,您應該妥善保管已經解除密碼保護之私鑰. |
| 26 | + |
| 27 | + 註: |
| 28 | + 如果沒有匯出私鑰, 有些早期git版本將會發生匯入失敗問題,例如:Ubuntu 12.04 with git 1.7.9.5. |
| 29 | + |
| 30 | + |
| 31 | +Firefox 憑證匯入步驟 |
| 32 | +============================================= |
| 33 | + |
| 34 | + Firefox 有自己的證書管理介面. |
| 35 | + |
| 36 | + 1. 點選 "選項->進階->憑證" |
| 37 | + 2. 點選 "檢視憑證清單" |
| 38 | + 3. 切換至 "您的憑證" |
| 39 | + 4. 點選 "匯入(M)" |
| 40 | + 5. 選擇電腦中的憑證檔案 $username.p12 |
| 41 | + 6. 輸入憑證檔案所需的密碼 |
| 42 | + 7. 切換至"憑證機構" |
| 43 | + 8. 找到 "Gitblit Certificate Authority" 憑證 |
| 44 | + 9. 點選"編輯信任(E)" |
| 45 | + 10.選擇信任網站. |
| 46 | + |
| 47 | + |
| 48 | +Chrome/IE (Windows) 憑證匯入步驟 |
| 49 | +============================================= |
| 50 | + |
| 51 | + 在Windows作業系統下, Chrome 與 IE 共用相同的憑證設定. |
| 52 | + |
| 53 | + IE |
| 54 | + ------------------------------------ |
| 55 | + 1. 選擇 "網際網路選項->內容" |
| 56 | + 2. 點選"憑證" |
| 57 | + |
| 58 | + Chrome |
| 59 | + ------------------------------------ |
| 60 | + 1. 選擇 "設定->顯示進階設定->HTTP/SSL" |
| 61 | + 2. 點選"管理憑證" |
| 62 | + |
| 63 | + 共同步驟 (Windows) |
| 64 | + ------------------------------------ |
| 65 | + 3. 切換至 "個人" |
| 66 | + 4. 點選"匯入(I)" |
| 67 | + 5. 依照指示匯入. |
| 68 | + 請切換匯入檔案類型為p12並且找到 $username.p12 這個憑證檔案 |
| 69 | + 6. 輸入憑證檔案保護密碼 |
| 70 | + 7. 由於主要發放憑證單位(CA)與個人憑證檔案皆儲存於 $username.p12, 因此匯入時候,必須選擇 "自動根據憑證類型來選擇憑證存放區". |
| 71 | + 如果選擇預設值匯入, 將不會安裝主要發放憑證單位(CA) |
| 72 | + |
| 73 | + |
| 74 | +Chrome (Linux) Installation Instructions |
| 75 | +============================================= |
| 76 | + |
| 77 | + On Linux, Chrome maintains it's own certificate store. |
| 78 | + |
| 79 | + 1. Navigate to Settings->Show Advanced Settings->HTTP/SSL |
| 80 | + 2. Click the "Manage Certificates..." button |
| 81 | + 3. Navigate your filesystem and select $username.p12 |
| 82 | + 4. At the password prompt enter the certificate store password |
| 83 | + You have now imported your private key, public certificate, and the CA certificate |
| 84 | + but now we must manually set the trust settings of the CA certificate. |
| 85 | + 5. Switch to the "Authorities" tab |
| 86 | + 6. Scroll down and find "Gitblit-> Gitblit Certificate Authority" |
| 87 | + 7. Select it and click "Edit Trust..." |
| 88 | + 8. Check "This certificate can identify websites" and click OK. |
| 89 | + |
| 90 | + |
| 91 | +Chrome/Safari (Mac OS X) Installation Instructions |
| 92 | +============================================= |
| 93 | + |
| 94 | +On Mac OS X, Chrome and Safari both use Keychain Access to store certificates |
| 95 | +so configuring one will automatically apply for both. |
| 96 | + |
| 97 | + 1. Double-click $username.pem |
| 98 | + 2. At the password prompt enter the certificate store password |
| 99 | + You have now imported your private key, public certificate, and the CA certificate |
| 100 | + but now we must manually set the trust settings of the CA certificate. |
| 101 | + 3. Find the Gitblit Certificate Authority certificate, it should have a red |
| 102 | + indicator meaning untrusted, and double-click it. |
| 103 | + 4. Open the "Trust" disclosure triangle and change "When using this certificate" |
| 104 | + to "Always Trust". |
| 105 | + 5. Close the certificate view and enter your system password to save the changes |
| 106 | + to your keychain. |
| 107 | + |
| 108 | + |
| 109 | +[1] PKCS#12 is one of the standard container formats for sharing private keys and |
| 110 | + public certificates. |
| 111 | +[2] http://www.openssl.org |
0 commit comments