Git Server with sshd on windows Server

在上次成功安裝msysGit之後,開始測試找尋如何在Windows上安裝Git Server。首先找到的是這個 git server for windows 是使用http伺服器的方式架設Git Server,  但是我還是想要用ssh的方式來提供Git Server 的服務。也有發現也可以使用Windows 網路芳鄰的方式(網路磁碟)來架設Git Server。我來發現了一篇使用winsshd來架設Git Server的教學

1. 現在我們開始來架設Git Server基於ssh協定的方式來達成。首先我們要注意windows系統變數中路徑Path是否已加上了下面這三條路徑:

C:\msysgit\msysgit\;
C:\msysgit\msysgit\bin\;
C:\msysgit\msysgit\minggw\bin;

2. 新增shell 命令「參數中引號問題」的修正檔,新增「C:\msysgit\msysgit\bin\gitcmdhelper.sh」文字檔。內容如下:

$*

3. 安裝winsshd for personal edition

4. 建立可登入windwos的ssh帳號和密碼(必需是本機已存在的帳號)

5.  Advanced Setting for Access Control to windows group , 此設定主要是要修正命令中參數中引號的問題。

注意「Exec request Prefix」最後要加上一個空白字元

6. 重新啟動winsshd

7. 在Git Server上建立一個 「git repository」

8. 「測試」使用ssh協定clone剛建立的repository

注意事項:
1. 無法顯示日文或是簡體字型可以安裝unicode補完計畫。
2. ssh連線的樣式「ssh://account@IP_Address[:port_num]/git_repository_path.git」,像是這樣「ssh://administrator@192.168.128.222/f/test」。

1 thoughts on “Git Server with sshd on windows Server

  1. 引用通告: Scott » Git ,SSH Server

發表留言