Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30318

Git plugin breaks usage of Git LFS due to lack of Git Clone use

    XMLWordPrintable

Details

    Description

      I'm currently involved in setting up a Jenkins-based build for our project and I've found that the popular Git plugin for Jenkins takes the slightly weird approach of git init+fetch instead of git clone when setting up the repo on agent machines.

      This appears to break Git LFS as all the binary files are still only the reference pointer files.

      The plugin does not currently appear to have any advanced options to force git cloning and there are a number of aged active tickets for the plugin to support it.

      I have raised an issue ticket over at Git LFS to discuss options with regards to this problem, which can be viewed here. It is not an issue for them to resolve, however they may be helpful in providing advice on how to best solve the problem for the plugin that provides minimal impact.

      Attachments

        Issue Links

          Activity

            takekecy Jakub Vlk added a comment -

            I am still getting error "stderr: git: 'lfs' is not a git command. See 'git --help'." but just on OS X system. On the Windows I am fine. I am using ssh btw... Any advice?

            Thx, Jakub

            takekecy Jakub Vlk added a comment - I am still getting error "stderr: git: 'lfs' is not a git command. See 'git --help'." but just on OS X system. On the Windows I am fine. I am using ssh btw... Any advice? Thx, Jakub
            markewaite Mark Waite added a comment -

            takekecy, you probably need to check your PATH settings to assure that git-lfs is installed as a program in the expected location on your MacOS machine.

            markewaite Mark Waite added a comment - takekecy , you probably need to check your PATH settings to assure that git-lfs is installed as a program in the expected location on your MacOS machine.
            takekecy Jakub Vlk added a comment -

            Yeah I was thinking in the same way. But I can use git lfs from terminal by just writing git lfs. So it should be OK...

            I used echo for my $PATH and I can see this: 

            /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

            and which git-lfs returns /usr/local/bin/git-lfs so it looks OK for me...

            Maybe there is a problem that git is installed in /usr/bin and git-lfs in /usr/local/bin/git-lfs? No sure though...

            takekecy Jakub Vlk added a comment - Yeah I was thinking in the same way. But I can use git lfs from terminal by just writing git lfs. So it should be OK... I used echo for my $PATH and I can see this:  /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin and which git-lfs returns /usr/local/bin/git-lfs so it looks OK for me... Maybe there is a problem that git is installed in /usr/bin and git-lfs in /usr/local/bin/git-lfs? No sure though...
            markewaite Mark Waite added a comment -

            Installing git-lfs in /usr/local/bin worked for me on several different Linux computers.

            You say that you used echo for your $PATH, but did you do that from within a Jenkins job? If so, then I have no idea what could be wrong.

            markewaite Mark Waite added a comment - Installing git-lfs in /usr/local/bin worked for me on several different Linux computers. You say that you used echo for your $PATH, but did you do that from within a Jenkins job? If so, then I have no idea what could be wrong.
            takekecy Jakub Vlk added a comment -

            Oooh god, you're right! It was echo from terminal, where I am logged... Thank you very much! I added lfs path to env variable in Jenkins settings and it's working!

            takekecy Jakub Vlk added a comment - Oooh god, you're right! It was echo from terminal, where I am logged... Thank you very much! I added lfs path to env variable in Jenkins settings and it's working!

            People

              markewaite Mark Waite
              strich Scott Richmond
              Votes:
              20 Vote for this issue
              Watchers:
              33 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: