学以致用

focus on Python , C++, and some interest in Go and R

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

在使用ngnix+Git搭建http访问Git的环境的时候出现404 not find error,究其原因是因为创建Git Repository的时候忘记执行git update-server-info 命令,导致使用http或者https访问Git Resository的时候找不到文件。
解决方法如下:
(1)进入Git Repository
  [root@GJZ git]# cd test.git/
(2)执行 update-server-info 命令
  [root@GJZ test.git]# git update-server-info

详细点儿的解释请参阅:
http://stackoverflow.com/questions/2085402/what-does-git-update-server-info-do
Dumb server basically means accessed over HTTP. So if you access your Git repository over http: or https: URLs, you need the update-server-info business, otherwise (git:, ssh:, etc.) you don't need it.

posted on 2011-11-10 18:14  Jerry.Kwan  阅读(606)  评论(0编辑  收藏  举报