加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

Windows上的msysGit’git clone’无法正常工作

发布时间:2020-12-14 05:28:53 所属栏目:Windows 来源:网络整理
导读:我已经在我的几台计算机上安装了msys Git,并且只在一台特定的计算机(我的主要工作计算机)上遇到问题. ‘git clone’不起作用.当我在存储库上运行clone命令时,会发生以下情况: C:Projectsgit clone git://github.com/[user]/[project].gitInitialized empty
我已经在我的几台计算机上安装了msys Git,并且只在一台特定的计算机(我的主要工作计算机)上遇到问题. ‘git clone’不起作用.当我在存储库上运行clone命令时,会发生以下情况:

C:Projects>git clone git://github.com/[user]/[project].git
Initialized empty Git repository in C:/Projects/[project]/.git/

它开始填充.git目录,但从不拉下其他任何东西.我已经离开了几个小时,看看它是否至少会抛出一个错误.它继续坐在那里.如果我尝试取消它,它就可以正常工作.它似乎从来没有把存储库拉下来.我在多个地方的多个存储库中尝试过这个.有没有人知道可能发生的事情?

解决方法

您是否尝试使用http地址进行克隆?

目前使用msysgit(issue 136)的票证存在同样的问题,目前的解决方法是使用http而不是git地址进行克隆.

尝试的其他举措:

> GIT_TRACE = 1(并发布输出)
>尝试使用msysgit的其他版本或旧版本
>检查主计算机上是否存在任何防火墙/防病毒问题

这里切换到旧版本的msysgit可能是正确的选择:
见GitHub support thread:

Are you using the 1.6.4 prerelease of msysGit? There are known bugs with it.
We recommend a stable version,such as 1.6.0.

??
??谢谢克里斯,就是这样:在切换回以前版本的msysGit(Git-1.6.3.2-preview20090608.exe)后,问题不再发生了.

该问题实际上可能会影响任何Git1.6.4及更早版本:

git tries to check if the pack file exists by sending out a HEAD request,but chokes on the 500 error that some (if not all) github returns.

Using the repository used by the reporter:

$curl http://github.com/grails/grails.git/objects/info/packs
P pack-1290e84bed53bda28f0989dca48d836bd9104031.pack
P pack-bf40d38ae780512994e5127e832ed9d8853c186d.pack
P pack-f490d5f7d4671368f4a52c618ca9dce13b714ba1.pack
P pack-79e3a7f30e8989acc8403ac688be669a05384eef.pack

$curl -I http://github.com/grails/grails.git/objects/pack/pack-bf40d38ae780512994e5127e832ed9d8853c186d.pack
HTTP/1.1 500 Internal Server Error
Server: nginx/0.6.26
Date: Fri,04 Sep 2009 13:50:20 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Content-Length: 3193
Cache-Control: no-cache

见this thread.
GitHub支持团队目前正在调查此问题:

I don’t think the 500s are intentional,but there may be something odd with our setup that is causing them.
I have a ticket open to investigate the issue further. I have a feeling we won’t be messing with this till after the move,since it’s likely something with the server config.

Git1.6.4.4从9月16日开始执行contain a fix:

The workaround for Github server that sometimes gave 500 (Internal server error) response to HEAD requests in 1.6.4.3 introduced a regression that caused re-fetching projects over http to segfault in certain cases due to uninitialized pointer being freed.

但mssysgit尚未发布(9月21日)自7月底最初的1.6.4以来的任何新版本. (他们可能正在等待1.6.5或1.7)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读