# fatal: cannot store pack file (git 1.6.0.2 + sshfs)

4 messages from 2008-09-23 to 2008-09-24. Participants: Jhair Tocancipa Triana, Shawn O. Pearce, Nathan W. Panike.
Thread: https://gitlist.dev/t/15637

## Jhair Tocancipa Triana, 2008-09-23 19:15

Subject: fatal: cannot store pack file (git 1.6.0.2 + sshfs)
Message-ID: <87iqsmy8q7.fsf@sms.ed.ac.uk>
URL: https://gitlist.dev/e/87iqsmy8q7.fsf%40sms.ed.ac.uk

```
I'm getting the following when running git on a partition mounted with
sshfs:

$ git pull
remote: Counting objects: 304, done.
remote: Compressing objects: 100% (256/256), done.
remote: Total 260 (delta 103), reused 0 (delta 0)
Receiving objects: 100% (260/260), 26.62 MiB | 3979 KiB/s, done.
Resolving deltas: 100% (103/103), completed with 32 local objects.
error: unable to write sha1 filename .git/objects/pack/pack-dc5c3614e795918f457a2f98a58f10134ebf246b.pack: Operation not permitted

fatal: cannot store pack file
fatal: index-pack failed

git pull worked fine in the same repository yesterday (new files where
committed in the meantime).

I'm not sure if this is a problem in git or in sshfs (or somewhere
else).

Any ideas what the problem could be?

Thanks,

-- 
Jhair

```

## Shawn O. Pearce, 2008-09-24 16:34

Subject: Re: fatal: cannot store pack file (git 1.6.0.2 + sshfs)
Message-ID: <20080924163400.GU3669@spearce.org>
URL: https://gitlist.dev/e/20080924163400.GU3669%40spearce.org
In-Reply-To: <87iqsmy8q7.fsf@sms.ed.ac.uk>

```
Jhair Tocancipa Triana <jhair.tocancipa@gmail.com> wrote:
> I'm getting the following when running git on a partition mounted with
> sshfs:
> 
> $ git pull
...
> error: unable to write sha1 filename .git/objects/pack/pack-dc5c3614e795918f457a2f98a58f10134ebf246b.pack: Operation not permitted
> fatal: cannot store pack file
> fatal: index-pack failed
> 
> git pull worked fine in the same repository yesterday (new files where
> committed in the meantime).
> 
> I'm not sure if this is a problem in git or in sshfs (or somewhere
> else).

Its the size of the fetch.  The day before you probably had a smaller
number of objects downloaded (<100) so Git used unpack-objects
instead of index-pack.  Yesterday it was a larger download (>100),
so it used index-pack.

In 1.6.0.2 index-pack writes a temporary file to .git/objects but
later tries to rename it into .git/objects/pack.  That renaming
must not be working on sshfs.

Latest "master" has a change from Pasky (8b4eb6b6 "Do not perform
cross-directory renames") that should fix this issue.  Or just
don't use sshfs.  Or teach sshfs to rename across directories.

-- 
Shawn.

```

## Nathan W. Panike, 2008-09-24 17:57

Subject: Re: fatal: cannot store pack file (git 1.6.0.2 + sshfs)
Message-ID: <d77df1110809241057rb1d7361pf76a4cde8834b1df@mail.gmail.com>
URL: https://gitlist.dev/e/d77df1110809241057rb1d7361pf76a4cde8834b1df%40mail.gmail.com
In-Reply-To: <20080924163400.GU3669@spearce.org>

```
Resend with reply to all:

When I mount with sshfs, I have to give the option

sshfs -o workaround=rename ...

to make things work normally.

On Wed, Sep 24, 2008 at 11:34 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
> Jhair Tocancipa Triana <jhair.tocancipa@gmail.com> wrote:
>> I'm getting the following when running git on a partition mounted with
>> sshfs:
>>
>> $ git pull
> ...
>> error: unable to write sha1 filename .git/objects/pack/pack-dc5c3614e795918f457a2f98a58f10134ebf246b.pack: Operation not permitted
>> fatal: cannot store pack file
>> fatal: index-pack failed
>>
>> git pull worked fine in the same repository yesterday (new files where
>> committed in the meantime).
>>
>> I'm not sure if this is a problem in git or in sshfs (or somewhere
>> else).
>
> Its the size of the fetch.  The day before you probably had a smaller
> number of objects downloaded (<100) so Git used unpack-objects
> instead of index-pack.  Yesterday it was a larger download (>100),
> so it used index-pack.
>
> In 1.6.0.2 index-pack writes a temporary file to .git/objects but
> later tries to rename it into .git/objects/pack.  That renaming
> must not be working on sshfs.
>
> Latest "master" has a change from Pasky (8b4eb6b6 "Do not perform
> cross-directory renames") that should fix this issue.  Or just
> don't use sshfs.  Or teach sshfs to rename across directories.
>
> --
> Shawn.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

```

## Jhair Tocancipa Triana, 2008-09-24 20:05

Subject: Re: fatal: cannot store pack file (git 1.6.0.2 + sshfs)
Message-ID: <87hc85mhry.fsf@sms.ed.ac.uk>
URL: https://gitlist.dev/e/87hc85mhry.fsf%40sms.ed.ac.uk
In-Reply-To: <d77df1110809241057rb1d7361pf76a4cde8834b1df@mail.gmail.com>

```
"Nathan W. Panike" <nathan.panike@gmail.com> writes:

> Resend with reply to all:
>
> When I mount with sshfs, I have to give the option
>
> sshfs -o workaround=rename ...
>
> to make things work normally.

I also mount with the same option (-o workaround=rename) to fix other
issues I had before, see

http://git.or.cz/gitwiki/GitFaq#head-c04838bdb94dae45b743fe6ebefde24e4df04c62

Will try with latest gist "master" as advised by Shawn.

Thanks,

-- 
Jhair

```
