Git pull错误:无法创建临时sha1文件名 [英] Git pull error: unable to create temporary sha1 filename

查看:1659
本文介绍了Git pull错误:无法创建临时sha1文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小的git repo设置,唯一真正的目的是能够在多台机器(工作,家庭,笔记本电脑)上进行本地开发。因此,我有一个分支,一旦离开计算机,我就执行/推动,一旦我坐下来,就拉动它。工作得很好,直到现在。现在,当我拉上我的'现场测试'机器时,我得到以下内容:

  remote:计数对象:38,完成。 
remote:Compressiremote:ng objects:100%(20/20),done。
remote:Total 20(delta 17),reused 0(delta 0)
error:无法创建临时sha1文件名.git / objects / ed:文件存在

致命错误:未能写入对象
致命:解包对象失败

在网上搜索唯一真实我能找到的答案如下: http://marc.info/?l = git& m = 122720741928774& w = 2 ,它基本上表明这是一个虚假的错误,因此没有说明真正的错误。



我在哪里可以从这里找到问题所在?

编辑:删除本地副本并重新克隆

解决方案

为什么这是值得的,当我遇到这个问题时 - 但是在提交时 - 我试过 git-repack git-gc ,但都不起作用。我得到了一个权限被拒绝的错误,这导致我将 chown 整个repo以递归方式递归给我期望的用户,然后我可以提交/推/拉没有问题。


I've got a small git repo setup with the only real purpose to be able to develop locally on several machines (work, home, laptop). Thus I have one branch and I commit/push once I leave a computer, pull once I sit down at the next. Has worked fine, up to now that is. Now when I pull on my 'live test' machine, I get the following:

remote: Counting objects: 38, done.
remote: Compressiremote: ng objects: 100% (20/20), done.
remote: Total 20 (delta 17), reused 0 (delta 0)
error: unable to create temporary sha1 filename .git/objects/ed: File exists

fatal: failed to write object
fatal: unpack-objects failed

Searching around the net the only real answer I could find was the following: http://marc.info/?l=git&m=122720741928774&w=2 which basically states that this is a bogus error that's on top of the pile and thus says nothing about what really is wrong.

Where do I go from here to find out what is wrong?

Edit: Removed the local copy and re-cloned

解决方案

For what it's worth, when I had this problem—but when committing—I tried git-repack and git-gc, but neither worked. I got a permission denied error, which led me to chown the entire repo recursively to the user I expected it to be, and I could then commit/push/pull with no problem.

这篇关于Git pull错误:无法创建临时sha1文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆