can't clone git repos via http; info/refs not found

懵懂的女人 提交于 2019-12-02 20:32:55

You will need to run git update-server-info on the server to generate the files necessary for the “dumb protocol” to work.

Try the steps mentioned here on git-scm for http/s protocol.

Basically, after doing the git clone --bare <path-to-repository>, you need to run mv hooks/post-update.sample hooks/post-update withing your bare repository and then do a git update-server-info once and then you should be able to clone the repo.

I have had this issue when the remote is running on a git repository 1.7.X and the git client is 1.8.X ; I proved it by downgrading my client to 1.7.X - this fixed the issue. So make sure git is the same version on "client" and "server" sides. The command I was running was git clone .

Remember also to check that the required modules are enable on apache. These are the required modules for git over HTTP:

  • mod_alias
  • mod_cgi
  • mod_env

I had the same error trying to clone a gitlab project because I set a wrong path !
I took the SSH path instead of the HTTP path. (+ do not forget the .git)

git clone *HTTP_path.git*
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!