突然无法从源站获取git
在我的存储库中,我远程跟踪我们的主存储库,它是空的。过去我从没有遇到过从原点取回的问题 但是,当我今天早上尝试远程更新时,出现以下错误:突然无法从源站获取git,git,git-remote,Git,Git Remote,在我的存储库中,我远程跟踪我们的主存储库,它是空的。过去我从没有遇到过从原点取回的问题 但是,当我今天早上尝试远程更新时,出现以下错误: fatal: '/users/integrator/project' does not appear to be a git repository fatal: The remote end hung up unexpectedly error: Could not fetch origin git clone /users/integrator/proje
fatal: '/users/integrator/project' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
error: Could not fetch origin
git clone /users/integrator/project
Cloning into project...
fatal: failed to open '/users/integrator/project/.git/objects': No such file or directory
我没有改变任何东西,存储库肯定还在那里。有几个人可以访问integrator帐户,但他们通常会进行合并和拉取。我们不允许推送到这个存储库
我的问题是:是什么导致了这一切?或者,是否有任何诊断方法可用于找出问题所在?我不是唯一一个突然出现此问题的用户,因此问题更可能出现在源端
更新:
尝试克隆裸存储库时,出现以下错误:
fatal: '/users/integrator/project' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
error: Could not fetch origin
git clone /users/integrator/project
Cloning into project...
fatal: failed to open '/users/integrator/project/.git/objects': No such file or directory
以下是/users/integrator/project的内容列表:
config
HEAD
packed-refs
ssh_helper
bin/
hooks/
info/
exclude
objects/
[lots of folders with two character long names]
info/
pack/
refs/
heads/
tags/
我想看看服务器上的
/users/integrator/project
目录中有什么。它看起来像git存储库吗?它需要至少有一个objects
目录、refs
目录和HEAD
文件,才能成为一个合适的git存储库。它包含所有这些吗
另一件需要检查的事情是,您是否可以直接登录到服务器,并从存储库进行克隆
除此之外,如果您仍然无法找出问题所在,我建议您编辑您的问题,以显示/users/integrator/project
中的内容列表,或许我们可以提供更多有关该信息的帮助
编辑基于您的编辑:
如果出现错误,您的裸存储库中可能有一个.git
目录。您可以使用ls-a
进行检查,以显示隐藏的文件。如果是这种情况,Git可能会首先查看存储库中的.Git
目录,而不是查看存储库目录本身。我会查看一下,然后将内部的.git
移走或删除,以允许git访问您的实际存储库
如果您的回购协议中没有
.git
目录,请在附近查找名为.git
或project.git
的任何内容;Git将根据您提供的路径名搜索各种路径名,并且一个没有的裸路径名。Git
子目录或后缀位于它搜索的末尾。如果有人需要它,对我来说解决方案是更新凭据。