我正在尝试建立一个可公开访问的 git 存储库,该存储库可以通过 HTTP 在我实际拥有并具有 root 访问权限的服务器上进行克隆,但我似乎遗漏了一些东西。我是 git 的新手,所以我不能很好地解决问题,但这是我所知道的:
- 我可以使用
git clone ssh://git@repo.alaskawh.com/awhsome-framework
克隆 git 仓库 git clone http://repo.alaskawh.com/framework
失败并显示fatal: repository 'http://repo.alaskawh.com/framework/' not found
- http://repo.alaskawh.com/framework/当我在网络浏览器中访问它时,列出 git 存储库中的文件就好了
/var/lib/gitolite/repositories/awhsome-framework.git
是 /var/www/repo.alaskawh.com/framework/
的符号链接(symbolic link),我我已经创建了包含行 exec git update-server-info
的文件 hooks/post-update
,并且我确保用户权限是正确的。
有人知道我做错了什么吗?
最佳答案
你应该设置一个 Git Smart HTTP server backend .提供了其他文档 here .这将通过 HTTP 提供简单高效的 Git 托管解决方案。
关于git - `git clone` 通过 HTTP 失败,返回 "repository not found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30313480/