简体   繁体   English

从Github克隆的问题

[英]Issues cloning from Github

I'm getting this strange error message when trying to clone or pull from git. 尝试从git克隆或提取消息时出现此奇怪的错误消息。 The strange thing is that me and a colleague previously had no issues with this. 奇怪的是,我和同事以前对此没有任何问题。 We then got two other team members to clone the repository and now suddenly me and the previous colleague continue to get these errors. 然后,我们还有另外两个团队成员来克隆存储库,现在突然之间,我和以前的同事继续遇到这些错误。 The two new guys have no problem pulling/pushing and cloning. 这两个新家伙没有问题拉/推和克隆。 Suddenly the two original team members can't do anything. 突然,原来的两个团队成员什么也做不了。

I can't imagine what the two new members might have modified or changed, we're just doing straightforward things at the moment. 我无法想象这两个新成员可能会进行哪些修改或更改,目前我们只是在做简单的事情。 Is it possibly an issue with GitHub and the previous team members accounts? GitHub和以前的团队成员帐户可能有问题吗?

Cloning into test...
Enter passphrase for key '/c/Users/Rob/.ssh/id_rsa':
remote: Counting objects: 8685, done.
remote: Compressing objects: 100% (3737/3737), done.
remote: Total 8685 (delta 5005), reused 8490 (delta 4810)
Receiving objects: 100% (8685/8685), 239.92 MiB | 158 KiB/s, done.
Resolving deltas: 100% (5005/5005), done.
error: refs/remotes/origin/master does not point to a valid object!
error: Trying to write ref refs/heads/master with nonexistant object 3cad1d0fb95b397ae8ed4826e29073362e135e2f
fatal: Cannot update the ref 'HEAD'.
Unlink of file 'test/.git/objects/pack/pack-9bca633d2527e271701b07f92128b15a6396277a.idx' failed. Should I try again? (y/n)

UPDATE: I just tried setting up a new account on github and tried to clone again, but same issues, which I guess narrows it down to some kind of global setting I might have on github. 更新:我只是尝试在github上设置一个新帐户,然后尝试再次克隆,但是同样的问题,我想将其缩小到我可能在github上进行的某种全局设置。

I had this exact issue and couldn't find a good answer for it originally. 我遇到了这个确切的问题,最初找不到合适的答案。 After much head banging on desk, it was pretty simple for me - I was running an older git client. 在桌子上撞了很多头之后,对我来说这很简单-我正在运行一个旧的git客户端。

  • my server that I was using git to do deploys onto, was running git 1.7.1 (default distribution for Centos6 at time of writing) 我使用git进行部署的服务器正在运行git 1.7.1(在撰写本文时,Centos6的默认分发)
  • git is now up to 1.7.12 git现在达到1.7.12
  • clearly some of my other clients had committed using features not backwards compatible. 显然,我的其他一些客户已承诺使用不向后兼容的功能。

I did an upgrade of the git client on the server. 我在服务器上升级了git客户端。 Problems went away. 问题消失了。 Hope that helps someone with the same issue. 希望对遇到同样问题的人有所帮助。

(For the record, Installing git from source on Centos6 was v.helpful) (据记录, 在Centos6上从源代码安装git是v.helpful)

最终这是git客户端的一个奇怪错误,我重新安装了它,然后一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM