Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-5591

SourceTree + Git LFS + OpenSSH fails to clone/pull

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 1.9.2-beta-0
    • 1.8.3, 1.9.0-beta-5
    • Git
    • None

    Description

      Since Git LFS version 1.1.1, cloning or pulling in SourceTree when using OpenSSH no longer works, reporting

      Use `git lfs logs last` to view the log.
      
      error: external filter git-lfs smudge -- %f failed
      

      The git-lfs logs report:

      fork/exec C:\Users\steve\Documents\projects\SourceTree\bin\Debug\tools\openssh_wrapper.sh: %1 is not a valid Win32 application.
      goroutine 1 [running]:
      github.com/github/git-lfs/lfs.Stack(0x0, 0x0, 0x0)
              /Users/rick/go/src/github.com/github/git-lfs/lfs/errors.go:566 +0x80
      github.com/github/git-lfs/commands.logPanicToWriter(0x1034198, 0x112c28d0, 0x10385c8, 0x112c2898)
              /Users/rick/go/src/github.com/github/git-lfs/commands/commands.go:195 +0xd00
      github.com/github/git-lfs/commands.logPanic(0x10385c8, 0x112c2898, 0x0, 0x0)
              /Users/rick/go/src/github.com/github/git-lfs/commands/commands.go:159 +0x35a
      github.com/github/git-lfs/commands.handlePanic(0x10385c8, 0x112c2898, 0x0, 0x0)
              /Users/rick/go/src/github.com/github/git-lfs/commands/commands.go:134 +0x46
      github.com/github/git-lfs/commands.LoggedError(0x10385c8, 0x112c2898, 0x8a7120, 0x21, 0x1130de3c, 0x2, 0x2)
              /Users/rick/go/src/github.com/github/git-lfs/commands/commands.go:84 +0x59
      github.com/github/git-lfs/commands.smudgeCommand(0xa88f80, 0x11358760, 0x1, 0x2)
              /Users/rick/go/src/github.com/github/git-lfs/commands/command_smudge.go:79 +0xb88
      github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra.(*Command).execute(0xa88f80, 0x11358690, 0x2, 0x2, 0x0, 0x0)
              /Users/rick/go/src/github.com/github/gitlfs/vendor/_nuts/github.com/spf13/cobra/command.go:477 +0x2d8
      github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra.(*Command).Execute(0xa89840, 0x0, 0x0)
              /Users/rick/go/src/github.com/github/gitlfs/vendor/_nuts/github.com/spf13/cobra/command.go:551 +0x44f
      

      The problem is that git-lfs recently started to support the GIT_SSH environment variable, which SourceTree sets to openssh_wrapper.sh in order to turn off things like user prompts. While that works perfectly well from Git, which is operating inside a Git Bash environment, git-lfs is a Windows executable which does not understand how to directly call a Bash shell script.

      Temporary workaround is to use PuTTY for SSH, or HTTPS URLs.

      Attachments

        Activity

          People

            sstreeting Steve Streeting (Inactive)
            sstreeting Steve Streeting (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: