Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,918
Community Members
 
Community Events
165
Community Groups

'git lfs install' failed with code 2

I'm trying to clone my project from bitbucket with SourceTree, and after a while I'm prompted with this:

image.png 

 

But when I click Ja (yes) I get this:

image.png 

Any known solutions?

I've tried running as ST as admin. Same happens.

2 answers

Hi, I had the same error and I was able to fix it with these steps:

  1. Close Sourcetree
  2. Go to your repo folder
  3. Go to .git/hooks folder
  4. Delete post-checkout, post-commit, post-merge and pre-push files
  5. Open Sourcetree again and press the 'Yes' button to install LFS stuff. This time it should be successful.

Hope it helps.

saju10 I'm New Here Mar 30, 2022

yes, its working! thanks

I have the same issue.

LFS is not working: pushing a file (filetype is tracked for LFS) is not stored in the LFS store. (checked with 'git lfs ls-files')

When I open a terminal and manually enter the command 'git lfs install', there are no errors:
- Updated git hooks.
- Git LFS initialized.

But after closing and opening sourcetree, the messages appear again.

I found out that the issue is solved when I select the embedded Git Version, which is different from the system Git Version.

I checked the release notes for the higher versions, but I couldn't find anything related.

Versions:

systemversion.pngembeddedversion.pngsourcetreeversion.png

My problem is that someone who has the wrong version and ignores the above messages and clones the repository, LFS files are not pulled, instead the LFS pointer file is placed in the working directory.

 

Any help on this?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Bug Fix: Sourcetree for Windows authentication error when updating to app password

Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...

62,513 views 128 27
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you