部署git伺服器(Windows Server 2008)

來源:互聯網
上載者:User

標籤:

原來的這個項目是一個人開發的,沒有做版本管理,我接手後準備搭建git版本管理服務端,方便離線開發和做版本管理;

一台雲主機,作業系統:Windows Server 2008,64位;

java已經安裝好了

C:\Users\chenyinxin>java -version

java version "1.7.0_71"

Java(TM) SE Runtime Environment (build 1.7.0_71-b14)

Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

之前公司用的是gitlab,感覺非常好用,尤其是線上代碼比對;

那就裝一個試試

下載GitLab Installers

貌似只能在linux機器部署,可惜了;

換哪個呢?

貌似Gitblit這個能用;

http://gitblit.com/

http://dl.bintray.com/gitblit/releases/gitblit-1.6.2.zip

解壓到本地:D:\git\gitblit-1.6.2

倉庫目錄:D:\git\repository

配置Gitblit目錄下的\data\gitblit.properties檔案:

倉庫位置:

git.repositoriesFolder= D:/git/repository

配置方式連接埠:

server.httpPort = 8081

 

運行Gitblit目錄下的gitblit.cmd就可以開啟伺服器了;

報錯:

2015-04-21 15:32:59 [WARN ] FAILED [email protected]{HTTP/1.1}{0.0.0.0:80

81}: java.net.BindException: Address already in use: bind

java.net.BindException: Address already in use: bind

at sun.nio.ch.Net.bind0(Native Method)

at sun.nio.ch.Net.bind(Unknown Source)

at sun.nio.ch.Net.bind(Unknown Source)

換個連接埠8088:

提示啟動成功了;

內網訪問下:http://localhost:8088/

外網訪問也可以;

以Windows service 方式啟動;

修改installService.cmd

SET ARCH=x86

然後雙擊運行,檢查服務;

安裝好了;

 

組態管理員賬戶密碼:

users.conf

登陸之後,建立版本庫:

提示版本庫為空白:

下載Git;https://github.com/msysgit/msysgit/releases/download/Git-1.9.5-preview20150319/Git-1.9.5-preview20150319.exe

安裝;

eclipse裡邊右鍵項目,Team-Share Project,選擇Git;

點擊Create

轉到項目目錄執行命令;

git remote add origin ssh://[email protected]:29418/srpm.git

git push -u origin master

右鍵,Git Bash here;

報錯:

是因為本地的庫還沒提交任何檔案;

建立自己用的開發使用者:

產生SSH Keys

ssh-keygen -t rsa -C " [email protected]"

開啟檔案:

"C:\Users\Administrator\.ssh\id_rsa.pub"

將檔案裡的內容全選複製,拷貝到,添加;

提交代碼,commit and push;

之前用的是admin的remote,改成新建立的使用者;

成功了;

安裝sourcetree作為git用戶端:

http://www.sourcetreeapp.com/

很好用的;

 

總結:

1、Gitblit安裝配置超簡單;

2、咋貌似頭像改不了的,功能列表感覺沒gitlab多,要不怎麼說gitlab強大呢;

 

後續

啟動window服務gitblit報錯:

"開始" -> "管理工具" -> "事件檢視器"

gitblit 服務因 操作成功完成。 服務特定錯誤而停止。

命令列啟動看錯誤;

***這算什麼,什麼鬼?

貌似installService設定少了CD變數;

Set CD=D:\git\gitblit-1.6.2

SET ARCH=x86

找到服務執行的程式

"D:\git\gitblit-1.6.2\x86\gitblit.exe"

命令列運行看報錯;

一閃而過;

未解決。。

部署git伺服器(Windows Server 2008)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.