Windows Server 2008 R2搭建GIT伺服器

來源:互聯網
上載者:User

Bonobo Git Server是一個運行在IIS6/7、MVC 3、.net 4.0平台基礎之上的開源GIT原始碼伺服器。下面將Windows Server 2008 R2下安裝過程分享一下:

1、環境準備

msysGit

TortoiseGIT

在 Windows Server 2008 R2 上安裝 IIS 7.5

Microsoft .NET Framework 4.0

ASP.NET MVC 3

2、下載Bonobo Git Server安裝包並解壓

3、下載64位版本的 System.Data.SQLite 替換/bin/目錄下的同名dll檔案

4、將解壓並替換dll檔案後的整個目錄拷貝至目標路徑,可是是預設的 c:inetpubwwwroot目錄,也可以單獨配置一個git子網域名稱,這裡我選擇後者,注意:應用程式集區要選擇ASP.NET v4.0

5、配置App_Data目錄許可權為“完全控制”,在目錄上點擊滑鼠右鍵 —>>> 屬性 —>>> 安全 —>>> 編輯

 

6、開啟瀏覽器輸入http://localhost/Bonobo.Git.Server或步驟5添加的子網域名稱(例如http://git.chiefleo.me/),以預設管理員身份登入:使用者名稱-admin,密碼-admin

7、在“Global Settings”中指定程式碼程式庫的根目錄,並設定好該目錄的檔案系統許可權(需要有寫入權限)

8、建立程式碼程式庫:Repositories —>>> Create New Repository —>>> 輸入程式碼程式庫相關資訊 —>>> 建立完畢,點擊程式碼程式庫名稱,就可以看到相應的Git Repository Location,以後可根據此連結clone、pull、push代碼了~

GIT使用問題匯總:

1、安裝BONOBO GIT SERVER以後,通過http://localhost/Bonobo.Git.Server或子網域名稱訪問,頁面顯示為空白。

解決方案:參考上述步驟5,配置App_Data目錄許可權為“完全控制”

2、GIT push比較大的檔案時,彈出錯誤提示:

Pushing to http://git.chiefleo.me/Git.aspx/xxx
fatal: protocol error: bad line length character: <!DO
fatal: The remote end hung up unexpectedly
error: RPC failed; result=55, HTTP code = 200

解決方案:開啟web.config,在 <system.web> 節點下設定最大請求長度(maxRequestLength)為102400000,在<system.webServer>節點下,設定最大允許內容長度(maxAllowedContentLength)為102400000,相關代碼如下:

 代碼如下 複製代碼

<system.web>
   <httpRuntime maxRequestLength="102400000" />
   ...
</system.web>
<system.webServer>
   ...
   <security>
     <requestFiltering>
       <requestLimits maxAllowedContentLength="102400000" />
     </requestFiltering>
   </security>
</system.webServer>
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.