Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git reset --hard hangs on CircleCI/Ubuntu 14 with git-lfs < 1.5.6

I'm deploying to CircleCI and but my code is timing out.

The command in particular that CircleCI is calling that's causing the time-out is during the checkout stage:

git reset --hard SHA

Where SHA is the hash of the build, but upon ssh'ing in I noted that HEAD and others that I tried also run forever.

At that point the code has been checked out with:

git clone --quiet [email protected]:Organization/Repo.git . --config core.compression=9 --depth 10 --no-single-branch

Why would git reset --hard run (seemingly) forever on the CircleCI environment, and what fixes are reasonably available?

More details (we've got some git-lfs files here, too):

  • lsb-release Ubuntu 14.04.4 LTS
  • git version 2.11.0
  • git-lfs/1.5.4 (GitHub; linux amd64; go 1.7.4)

EDIT This appears related to:

  • github.com/git-lfs/git-lfs/pull/1932 (per @torek's comment)
  • https://discuss.circleci.com/t/is-there-any-way-to-disable-git-lfs-in-ubuntu-14-04-trusty-image/10208/12

I would also note that adding GIT_LFS_SKIP_SMUDGE=1 (in the CircleCI Project config) has not had any useful effect.

It does help to go back to Ubuntu 12, but obviously that's less than ideal.

EDIT

Here's a recent bug report I filed: https://discuss.circleci.com/t/cannot-pull-with-git-lfs/14346

(Just to ensure visibility, because my other reports were buried in comments)

like image 764
Brian M. Hunt Avatar asked Jul 08 '17 13:07

Brian M. Hunt


People also ask

Can you recover from git reset hard?

We can use the command git fsck to recover the files after a hard reset.

What does git reset -- hard mean?

git reset --hard. Reset the staging area and the working directory to match the most recent commit. In addition to unstaging changes, the --hard flag tells Git to overwrite all changes in the working directory, too.

What is the latest version of git LFS?

3.0. 2 (28 Oct 2021) This release is a bugfix release which fixes a variety of problems seen since 3.0. 0, including problems with empty files, git lfs fsck --pointers , and the testsuite.


1 Answers

The issue was a typo, namely that CircleCI was running version 1.0, but should have been using 2.0.

In particular, I had created a .circleci/config.yaml, with the appropriate config.

... however, it should've been called .circleci/config.yml.

like image 76
Brian M. Hunt Avatar answered Oct 27 '22 00:10

Brian M. Hunt