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

    • Similar Issues:

      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

            Hide
            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

            Show
            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
            Hide
            markewaite Mark Waite added a comment -

            Jakub Vlk, 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.

            Show
            markewaite Mark Waite added a comment - Jakub Vlk , 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.
            Hide
            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...

            Show
            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...
            Hide
            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.

            Show
            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.
            Hide
            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!

            Show
            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

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

                Dates

                • Created:
                  Updated:
                  Resolved: