Issues cloning from Github

夙愿已清 提交于 2019-12-01 10:30:17

问题


I'm getting this strange error message when trying to clone or pull from 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?

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.


回答1:


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.

  • 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 is now up to 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. Problems went away. Hope that helps someone with the same issue.

(For the record, Installing git from source on Centos6 was v.helpful)




回答2:


This ended up being a strange error with the git client, I re-installed and everything worked fine after that.



来源:https://stackoverflow.com/questions/10723081/issues-cloning-from-github

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!