Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can't re-clone a repo in Sourcetree

chris.oneill March 2, 2015

I have a rather small repo, hosting on a gitlab server.  Through a series of unfortunate events, I messed up my local version of the repo trying to commit and push changes that were fairly inconsequential.  Rather than bother fixing that merge conflict, I opted to delete my local repo and clone it again.  That's where the problems started...  

 

Cloning into '/Users/chris/myreponame'...

warning: templates not found /usr/local/git/share/git-core/templates

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

 

I can't seem to get around this.  I've rebooted, updated and reinstalled Sourcetree, tried cloning into various different folders on my local machine, same error each time.  Others are able to clone the repo fresh into a new location, and have had no issues pulling, committing, or pushing into this repo.  It certainly seems to be a local problem on my machine.  Short of formatting OSX and reinstalling my operating system, i'm out of ideas here.  I've found a few posts around the internet from people getting the same error message, but there's never an answer for the problem.  Posting here in hopes of getting a hint!  smile

1 answer

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2015

I think your problem is not with SourceTree. The key part is "The remote end hung up unexpectedly." Since you say that others can access the repo correctly, it is also probably not a server problem.

The two main possibilities:

  • Something wrong with your Git installation ("warning: templates not found /usr/local/git/share/git-core/templates" points in this direction; reinstall Git to make sure it has all the bits and pieces.)
  • Local firewall settings make Git unable to reach the server.
chris.oneill March 2, 2015

Well that was at least an interesting rabbit hole!  My Sourcetree was set, I believe by default, to use Embedded Git.  I switched it to use System Git, but had the same error occur.  So I went and downloaded git-2.2.1-intel-universal-mavericks.dmg file.  Followed the readme instructions, ran an uninstall.sh script first, installed git, and ran another script to setup the git path for non-terminal programs.  Rebooted my mac and in the terminal did a "git --version" which is still showing "git version 1.9.3 (Apple Git-50)" rather than the newer git version, 2.2.1...  So am I presuming the uninstall.sh script did not find the proper version of Git to uninstall?  

 

edit: I did manage to get Sourcetree to recognize the newer version of Git eventually.  Now it's showing 2.2.1 in the stree UI, but same damn error message.  Others in the office here are on the same network as myself, I can't see it being a firewall issue.  Still lost!

chris.oneill March 2, 2015

I discovered that the repo folder was actually still sitting in my OSX trash.   Running out of time to fix this, I just restored the folder and that will have to do!  Presumably Sourcetree/Git was still referencing the version of the repo that was in the Trash?  

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2015

Not sure how the trash works in OSX, but it might be that it was using it from there. Is it solved now?

chris.oneill March 3, 2015

Well it's solved in that I gave up trying to re-clone. :) I still think it's probably a bug in SourceTree, if it's still holding on to references for things that have been deleted in the filesystem, but I'll have to do more testing on that sometime and submit a proper bug report. Thanks for the help!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events