iT邦幫忙

2

架設git server問題

石頭 2017-02-20 08:51:5810828 瀏覽

各位大大好!
小弟最近在架設一個git server
參考教學
http://huan-lin.blogspot.com/2011/05/install-git-server-and-apache-on.html
架設完畢後client clone下來正常 但要push上去時 會出現403的錯誤如下圖
http://ithelp.ithome.com.tw/upload/images/20170220/20096630X2rPj7cU67.png
我查看apahce的error.log 是說
http://ithelp.ithome.com.tw/upload/images/20170220/20096630OK0fcFbIOy.png
上網查了許多資料 都沒有用><
PS:我原本想說是資料夾權限問題 所以我把權限開給everyone 但還是沒有用

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

1
海綿寶寶
iT邦大神 1 級 ‧ 2017-02-21 10:01:51
最佳解答

有檢查過防火牆嗎?

問題排除:如果你用 HTTP 的方式存取 Git repository 時碰到錯誤代碼 403,請檢察 Git 所在的機器的防火牆設定,看看是不是 TCP port 被擋住了。我在使用 Windows Azure 的虛擬機器時,一開始沒有去設定 endpoint,結果無論怎樣都存取不到。

上面不是我說的
是你參考的那篇文章作者說的

如果還是不行
請 Google 「client denied by server configuration git-http-backend.exe」
就有一堆資訊可參考

看更多先前的回應...收起先前的回應...
fillano iT邦超人 1 級 ‧ 2017-02-21 12:01:55 檢舉

我猜是漏了<Directory>設定XD

石頭 iT邦高手 1 級 ‧ 2017-02-22 08:00:38 檢舉

@fillano 您好
我的設定是
<VirtualHost *:80>
<Directory "C:/GitRepos">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

<Directory "C:/Program Files/Git/mingw64/libexec/git-core">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all


@海綿寶寶 您好
我git server目前因測試 所以把防火牆都關了

試試看這篇提到的

<Directory "C:\git-server">
Options +ExecCGI
Require all granted
</Directory>
石頭 iT邦高手 1 級 ‧ 2017-02-22 11:23:25 檢舉

海綿寶寶 還是不能用><
我懷疑是不是 資料夾權限的問題 但我有開權限出來了..
我目前是用git server bonobo 可以正常使用!

可以就好囉...

我要發表回答

立即登入回答