threads / discuss / 24443

unpack failed --- is my repos broken?

Subject: unpack failed --- is my repos broken?

## tl;dr

7 messages between Jul 20, 2010 and Jul 23, 2010.

replies: 6people: 4as markdown or json

Ivan Uemlianin· Jul 20, 2010, 13:42 UTC · lore
Dear All

I have several git repositories on a server, with which I'm communicating using smart-http. Push and pull is all going fine. Until this morning, one of the repositories is not allowing pushes:

     $ git push
     Password: ...
     Counting objects: 5, done.
     Delta compression using up to 2 threads.
     Compressing objects: 100% (3/3), done.
     Writing objects: 100% (3/3), 410 bytes, done.
     Total 3 (delta 2), reused 0 (delta 0)
     error: unpack failed: unpack-objects abnormal exit

Other repositories on the same server (and under the same /var/www/git/ directory) are working fine.

I have googled around and this doesn't seem to be an uncommon problem, but I haven't found a solution.

Does the above mean this repository is broken and I should rescue or replace it (as in "How to fix a broken repository?" on the git wiki [1])?

Is smart-http not entirely reliable? In which case what is the preferred way to communicate remotely (we need to push as well as pull; there are a very small number of active developers)?

With thanks and best wishes
Ivan
[1] How to fix a broken repository?
     
http://git.wiki.kernel.org/index.php/GitFaq#How_to_fix_a_broken_repository.3F
-- 
============================================================
Ivan A. Uemlianin
Speech Technology Research and Development

                     ivan@llaisdy.com
                      www.llaisdy.com
                          llaisdy.wordpress.com
                      www.linkedin.com/in/ivanuemlianin

     "Froh, froh! Wie seine Sonnen, seine Sonnen fliegen"
                      (Schiller, Beethoven)
============================================================
Jared Hance· Jul 20, 2010, 15:35 UTC · re: Ivan Uemlianin · lore

Re: unpack failed --- is my repos broken?

On Tue, Jul 20, 2010 at 02:42:29PM +0100, Ivan Uemlianin wrote:
> Is smart-http not entirely reliable?  In which case what is the
> preferred way to communicate remotely (we need to push as well as
> pull; there are a very small number of active developers)?

I'm not entirely sure why the error is occuring, but the preferred way to communicate is over SSH. You can use the git protocol for anonymous pulling (but not pushing).

Ivan Uemlianin· Jul 23, 2010, 09:42 UTC · re: Jared Hance · lore

ssh communication not working

Dear All
Thank you for your comments.  I apologise for my delayed response.

I can't remember why I set up smart-http. There was a good reason at the time, but it's possible that the reason is no longer in effect.

I tried cloning over ssh and got an error:
     $ git clone ivan@myserver.com:/path/to/git/myproject.git
     Initialized empty Git repository in /Users/ivan/.git/
     ivan@85.92.88.62's password: ...
     bash: git-upload-pack: command not found
     fatal: The remote end hung up unexpectedly

I have ssh access to the server, but it's possible that I haven't set up the server to serve git over ssh. Please could someone point me to the appropriate place in the documentation? The command git upload-pack is available on the client and on the server.

With thanks and best wishes
Ivan
On 20/07/2010 16:35, Jared Hance wrote:
Show 10 quoted lines
> On Tue, Jul 20, 2010 at 02:42:29PM +0100, Ivan Uemlianin wrote:
>    
>> Is smart-http not entirely reliable?  In which case what is the
>> preferred way to communicate remotely (we need to push as well as
>> pull; there are a very small number of active developers)?
>>      
> I'm not entirely sure why the error is occuring, but the preferred way
> to communicate is over SSH. You can use the git protocol for anonymous
> pulling (but not pushing).
>    
-- 
============================================================
Ivan A. Uemlianin
Speech Technology Research and Development

                     ivan@llaisdy.com
                      www.llaisdy.com
                          llaisdy.wordpress.com
                      www.linkedin.com/in/ivanuemlianin

     "Froh, froh! Wie seine Sonnen, seine Sonnen fliegen"
                      (Schiller, Beethoven)
============================================================
Ilari Liusvaara· Jul 23, 2010, 10:07 UTC · re: Ivan Uemlianin · lore

Re: ssh communication not working

On Fri, Jul 23, 2010 at 10:42:49AM +0100, Ivan Uemlianin wrote:
Show 8 quoted lines
> 
> I tried cloning over ssh and got an error:
> 
>     $ git clone ivan@myserver.com:/path/to/git/myproject.git
>     Initialized empty Git repository in /Users/ivan/.git/
>     ivan@85.92.88.62's password: ...
>     bash: git-upload-pack: command not found
>     fatal: The remote end hung up unexpectedly

You don't have git-upload-pack in non-interactive $PATH (it is not the same as $PATH for interactive logins). Edit ~/.bashrc on remote side?

-Ilari
Ivan Uemlianin· Jul 23, 2010, 10:43 UTC · re: Ilari Liusvaara · lore

Re: ssh communication not working

Aha!  It works!
Dear Ilari
Thanks very much!
Best wishes
Ivan
On 23/07/2010 11:07, Ilari Liusvaara wrote:
Show 15 quoted lines
> On Fri, Jul 23, 2010 at 10:42:49AM +0100, Ivan Uemlianin wrote:
>    
>> I tried cloning over ssh and got an error:
>>
>>      $ git clone ivan@myserver.com:/path/to/git/myproject.git
>>      Initialized empty Git repository in /Users/ivan/.git/
>>      ivan@85.92.88.62's password: ...
>>      bash: git-upload-pack: command not found
>>      fatal: The remote end hung up unexpectedly
>>      
> You don't have git-upload-pack in non-interactive $PATH (it is not the same
> as $PATH for interactive logins). Edit ~/.bashrc on remote side?
>
> -Ilari
>    
-- 
============================================================
Ivan A. Uemlianin
Speech Technology Research and Development

                     ivan@llaisdy.com
                      www.llaisdy.com
                          llaisdy.wordpress.com
                      www.linkedin.com/in/ivanuemlianin

     "Froh, froh! Wie seine Sonnen, seine Sonnen fliegen"
                      (Schiller, Beethoven)
============================================================
Tay Ray Chuan· Jul 21, 2010, 16:12 UTC · re: Ivan Uemlianin · lore

Re: unpack failed --- is my repos broken?

Hi,
On Tue, Jul 20, 2010 at 9:42 PM, Ivan Uemlianin <ivan@llaisdy.com> wrote:
Show 8 quoted lines
>    $ git push
>    Password: ...
>    Counting objects: 5, done.
>    Delta compression using up to 2 threads.
>    Compressing objects: 100% (3/3), done.
>    Writing objects: 100% (3/3), 410 bytes, done.
>    Total 3 (delta 2), reused 0 (delta 0)
>    error: unpack failed: unpack-objects abnormal exit

Have you checked for repository corruption on the local side? You might be pushing bad stuff to the server.

-- 
Cheers,
Ray Chuan
Ivan Uemlianin· Jul 23, 2010, 09:38 UTC · re: Tay Ray Chuan · lore

Re: unpack failed --- is my repos broken?

Dear All
Thank you for your comments.  I apologise for my delayed response.

I think the local side is not the problem: if I do a fresh clone, then when I try a push I get the same error.

For the moment I have deleted and recreated the git repos on the server (tedious but quick), and all seems well. Is this an occasional fault I can expect with the smart-http backend?

See query about ssh under separate title.
With thanks and best wishes
Ivan
On 21/07/2010 17:12, Tay Ray Chuan wrote:
Show 17 quoted lines
> Hi,
>
> On Tue, Jul 20, 2010 at 9:42 PM, Ivan Uemlianin<ivan@llaisdy.com>  wrote:
>    
>>     $ git push
>>     Password: ...
>>     Counting objects: 5, done.
>>     Delta compression using up to 2 threads.
>>     Compressing objects: 100% (3/3), done.
>>     Writing objects: 100% (3/3), 410 bytes, done.
>>     Total 3 (delta 2), reused 0 (delta 0)
>>     error: unpack failed: unpack-objects abnormal exit
>>      
> Have you checked for repository corruption on the local side? You
> might be pushing bad stuff to the server.
>
>    
-- 
============================================================
Ivan A. Uemlianin
Speech Technology Research and Development

                     ivan@llaisdy.com
                      www.llaisdy.com
                          llaisdy.wordpress.com
                      www.linkedin.com/in/ivanuemlianin

     "Froh, froh! Wie seine Sonnen, seine Sonnen fliegen"
                      (Schiller, Beethoven)
============================================================

← back to recent threads