# git push failed

2 messages from 2010-01-24 to 2010-01-24. Participants: Björn Gustavsson, Jay Soffian.
Thread: https://gitlist.dev/t/22369

## Björn Gustavsson, 2010-01-24 17:52

Subject: git push failed
Message-ID: <6672d0161001240952s7f7629a6v48f5756c083b95b5@mail.gmail.com>
URL: https://gitlist.dev/e/6672d0161001240952s7f7629a6v48f5756c083b95b5%40mail.gmail.com

```
With git built from master (v1.6.6.1-436-gaba7dea),
the following commands (run in a script):

  git commit --amend -m "Update index.html" index.html
  git push erlang +gh-pages

failed like this:

Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 3.85 KiB, done.
Total 3 (delta 0), reused 0 (delta 0)
error: Ref refs/heads/gh-pages is at
db10c045e068f12aa2f78377fab31e35a8443ca4 but expected
054136d96494979b42524a4dc08ef643bb54cc0e
error: failed to lock refs/heads/gh-pages
To git@erlang_github.com:erlang/otp.git
 ! [remote rejected] gh-pages -> gh-pages (failed to lock)
error: failed to push some refs to 'git@erlang_github.com:erlang/otp.git'

Unfortunately (from the point of view of finding the bug), the
problem is not reproducible. When I ran my script two more times,
it worked fine.

We all know how difficult it is to investigate non-reproducible bugs,
but perhaps someone familiar with the code might have some idea
about what it could be.

Info about my system:

Mac OS X 10.2.6 (8 cores)
gcc-4.2.1

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB

```

## Jay Soffian, 2010-01-24 23:35

Subject: Re: git push failed
Message-ID: <76718491001241535n7c47e898mbade26caa312b9db@mail.gmail.com>
URL: https://gitlist.dev/e/76718491001241535n7c47e898mbade26caa312b9db%40mail.gmail.com
In-Reply-To: <6672d0161001240952s7f7629a6v48f5756c083b95b5@mail.gmail.com>

```
2010/1/24 Björn Gustavsson <bgustavsson@gmail.com>:
> With git built from master (v1.6.6.1-436-gaba7dea),
> the following commands (run in a script):
>
>  git commit --amend -m "Update index.html" index.html
>  git push erlang +gh-pages
>
> failed like this:
>
> Counting objects: 4, done.
> Delta compression using up to 8 threads.
> Compressing objects: 100% (2/2), done.
> Writing objects: 100% (3/3), 3.85 KiB, done.
> Total 3 (delta 0), reused 0 (delta 0)
> error: Ref refs/heads/gh-pages is at
> db10c045e068f12aa2f78377fab31e35a8443ca4 but expected
> 054136d96494979b42524a4dc08ef643bb54cc0e
> error: failed to lock refs/heads/gh-pages
> To git@erlang_github.com:erlang/otp.git
>  ! [remote rejected] gh-pages -> gh-pages (failed to lock)
> error: failed to push some refs to 'git@erlang_github.com:erlang/otp.git'
>
> Unfortunately (from the point of view of finding the bug), the
> problem is not reproducible. When I ran my script two more times,
> it worked fine.
>
> We all know how difficult it is to investigate non-reproducible bugs,
> but perhaps someone familiar with the code might have some idea
> about what it could be.
>
> Info about my system:
>
> Mac OS X 10.2.6 (8 cores)
> gcc-4.2.1

As another data point, I've noticed the same issue pushing from one
Mac OS X 10.6.2 system to another. However, the remote end is updated
properly (if you push again you'll see there's nothing to update), so
I've not bothered to dig into what the cause might be.

j.

```
