夜勿眠 发表于 2015-7-30 11:55:02

nginx+Git 404 error 错误处理

  在使用ngnix+Git搭建http访问Git的环境的时候出现404 not find error,究其原因是因为创建Git Repository的时候忘记执行git update-server-info 命令,导致使用http或者https访问Git Resository的时候找不到文件。
解决方法如下:
(1)进入Git Repository
  # cd test.git/
(2)执行 update-server-info 命令
  # 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.
页: [1]
查看完整版本: nginx+Git 404 error 错误处理