0

I have set me up a new repo on my server, I have it working with a push/pull on my local machine. I moved over to another computer today and tried to clone it but throws this error back at me:

MacBook-Pro:htdocs macbook$ git clone myuser@mysite.com:~/opt/git/myrepo.git
Cloning into 'myrepo'...
myuser@mysite.com's password:
remote: Counting objects: 8897, done.
remote: Compressing objects: 100% (7192/7192), done.
Write failed: Broken pipe89/8897), 260.00 KiB | 502.00 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

My git config on the server:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = true
    sharedrepository = 1
[receive]
    denyNonFastforwards = true
[remote "origin"]
    fetch = +refs/heads/*:ref/remotes/origin/*
    url = ssh://mysshuser@mywebsite.com/~/opt/git/myrepot.git

[branch "master"]
    remote = origin
    merge = refs/heads/master

[branch "develop"]
    remote = origin
    merge = refs/heads/develop

I'm running git version 1.7.1

Josh
  • 3,673
  • 3
  • 20
  • 27
  • Are you sure you are running that version on ALL the machines? I recently had exactly your error message, and without analyzing the failure in detail, updating the Git version from something less than 1.6.x to a more recent 1.9 on the machine hosting the repo to be cloned fixed it. – Sven Jul 28 '14 at 22:42
  • @Sven Wow, sure enough. I have git version 1.8.5 on my local. Is it best to stick with the 1.8.5 or is 1.7.1 better to have production sites in? I know newest isn't always better. – Josh Jul 29 '14 at 13:59
  • Combinations of 1.9 and 2.0 do work from my experience. 1.7.1 is from 2010, 1.8.5 is from November 2013. I would go with the newest that is reasonably available (i.e. install with your distro, not compile yourself, if possible). – Sven Jul 29 '14 at 18:13
  • @Sven I've been looking into how to update git on my server since 1.7 is so old. I usually used `apt-get` in the past but I don't have this functionality on this server. Bit frustrating. Been looking into the host to see why. Is this not usually something all Linux servers come with? – Josh Jul 29 '14 at 18:24
  • @Sven, Figured it out. Found out I'm on CentOS which uses yum. I got everything working now after I updated git to the newest version. Thanks again for all the help. :) – Josh Jul 29 '14 at 19:44

1 Answers1

0

Issue solved: git version caused issue. Updated to 1.8.5 on server to match local machine version.

Josh
  • 3,673
  • 3
  • 20
  • 27