git - `git clone` 通过 HTTP 失败,返回 "repository not found"

标签 git apache

我正在尝试建立一个可公开访问的 git 存储库,该存储库可以通过 HTTP 在我实际拥有并具有 root 访问权限的服务器上进行克隆,但我似乎遗漏了一些东西。我是 git 的新手,所以我不能很好地解决问题,但这是我所知道的:

  1. 我可以使用 git clone ssh://git@repo.alaskawh.com/awhsome-framework 克隆 git 仓库
  2. git clone http://repo.alaskawh.com/framework 失败并显示 fatal: repository 'http://repo.alaskawh.com/framework/' not found
  3. 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/

相关文章:

通过 Internet 连接时,Apache 尝试连接到本地网络

apache - 如何使用 Apache 在生产环境中运行 Mercure

php - 使用 PHP 或 Django 在 Apache 中重定向八位字节流

html - 我可以在 markdown 中使用 en/em dash 吗?

git - github 中 main 和 master 分支的指导

git - .gitignore 中的评论?

apache - Centos7 Apache SSL

git - 如何确保所有内容都已使用 git 推送?

git - 为什么我需要 SSH 授权才能克隆公开可用的 Git 存储库?

apache - 如何告诉 Apache 忽略/阻止 404 错误并重定向到处理页面?