【问题标题】:Git clone through http:// does not clone all tagsgit clone 通过 http:// 不会克隆所有标签
【发布时间】:2013-01-19 06:48:24
【问题描述】:

当我执行git clone http://<url-to-my-repo>/repo.git 时,并非存储库的所有标签都被复制。当我通过ssh:// 克隆时,我没有有这个问题。

我不知道这怎么可能。我确保运行为文件提供服务的 apache 进程的 _www 用户可以访问服务器上的所有裸仓库文件。

在服务器上

标签

bash-3.2# git tag
1.9
1.9.1
1.9.2
1.9.3
1.9.4
1.9.5
2.0
2.1
2.1.1
2.1.2
2.2
2.2.1
2.2.2
2.2.3
2.2.4
2.3
2.3.1
2.3.2
2.4.0
2.4.1
2.4.2
2.4.3
2.4.4

repo 的文件权限

bash-3.2# ls -alh
total 24
drwxr-x---   10 git  _www    340B Dec  3 12:12 .
drwxr-xr-x    9 git  staff   306B Feb  1 16:46 ..
-rwxrwxrwx    1 git  _www     23B Dec  3 12:12 HEAD
drwxrwxrwx    2 git  _www     68B Dec  3 12:12 branches
-rwxrwxrwx    1 git  _www    112B Dec  3 12:12 config
-rwxrwxrwx    1 git  _www     73B Dec  3 12:12 description
drwxrwxrwx   10 git  _www    340B Dec  3 12:12 hooks
drwxrwxrwx    4 git  _www    136B Jan  8 23:19 info
drwxrwxrwx  220 git  _www    7.3K Feb  1 23:14 objects
drwxrwxrwx    4 git  _www    136B Dec  3 12:12 refs

克隆时

通过http://

/Library/WebServer/TrinchHosts/www master $ git tag
1.9
1.9.1
1.9.2
1.9.3
1.9.4
1.9.5
2.0
2.1
2.1.1
2.1.2
2.2
2.2.1
2.2.2
2.2.3
2.2.4
2.3
2.3.1
2.3.2
2.4.0
2.4.1
2.4.2

通过ssh://

/Library/WebServer/TrinchHosts/www master $ git tag
1.9
1.9.1
1.9.2
1.9.3
1.9.4
1.9.5
2.0
2.1
2.1.1
2.1.2
2.2
2.2.1
2.2.2
2.2.3
2.2.4
2.3
2.3.1
2.3.2
2.4.0
2.4.1
2.4.2
2.4.3
2.4.4

我不知道为什么当我通过http:// 克隆存储库时,2.4.32.4.4 标记没有被复制

有什么帮助或想法吗?可能是什么问题?

谢谢!

【问题讨论】:

    标签: git http ssh tags clone


    【解决方案1】:

    检查您的服务器存储库中是否启用了 post-update 挂钩,该挂钩调用 update-server-info 来记录 http 哑服务器可能遗漏的一些细节。有关这方面的一些详细信息,请参阅the manual page

    【讨论】:

    • 谢谢。运行git update-server-info 解决了这个问题。我还按照您的建议将其添加为post-update 钩子。现在完美运行...再次感谢!
    猜你喜欢
    • 1970-01-01
    • 2016-10-10
    • 2011-07-30
    • 2020-06-09
    • 1970-01-01
    • 2019-06-07
    • 2021-09-01
    • 1970-01-01
    • 2012-03-01
    相关资源
    最近更新 更多