Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-2536

msysgit installed on Windows, still get "git was not found on the PATH for Stash"

      When you install msysgit, you are asked in one of the dialogs how your PATH should be modified.

      1. Use Git Bash Only
      2. Run Git from the Windows Command Prompt
      3. Run Git and included Unix tools from the Windows Command Prompt

      If you select option 2. (which I guess most users will pick, as option 3. has a scary warning), the "<...>\Git\cmd" directory will be added to the PATH.
      If you pick option 3. the "<...>\Git\bin" directory will also be added.

      Now if you run "git --version" from the commandline, it will run "<...>\Git\cmd\git.cmd", which will call "git.exe --version".
      I guess Stash tries to run "git.exe --version" to determine the installed git version.
      If you've installed msysgit with option 3. you're fine, as "<...>\Git\bin\git.exe" is in your path.
      Did you select option 2. you're out of luck as that directory as not added to your path.

      The workaround for the user is to either run the msysgit installer again and select option 3. to have your PATH properly set, or edit your PATH manually.

      If Stash is indeed calling "git.exe --version", this problem will be solved if Stash calls "git --version" instead.

            [BSERV-2536] msysgit installed on Windows, still get "git was not found on the PATH for Stash"

            mwatson@atlassian.com yes, the changes in STASH-2536 also addresses this issue. Both issues will be closed at the same time.

            Pierre-Etienne Poirot (Inactive) added a comment - mwatson@atlassian.com yes, the changes in STASH-2536 also addresses this issue. Both issues will be closed at the same time.

            Note: this applies to msysgit prior to Git-1.7.11-preview20120620:
            https://github.com/msysgit/msysgit/commit/bcb6b06cca1cd7382055898649f4403c83743f7b

            In that versions and later versions, "git.exe" is put in the "INSTALL/cmd" dir, instead of "git.cmd".

            Pierre-Etienne Poirot (Inactive) added a comment - Note: this applies to msysgit prior to Git-1.7.11-preview20120620: https://github.com/msysgit/msysgit/commit/bcb6b06cca1cd7382055898649f4403c83743f7b In that versions and later versions, "git.exe" is put in the "INSTALL/cmd" dir, instead of "git.cmd".

            The docs start with the instruction to run "git --version".
            Only when it reports a version < 1.7.6 you continue reading, expand the section, and see the instruction to install msysgit with option 3.
            If you installed msysgit >= 1.7.6 with option 2, running "git --version" will return a correct version, as git.cmd is found.

            Either the documentation should be changed to specify git.exe instead of plain git, or Stash should execute "git" instead of "git.exe".

            Rene Verschoor (Inactive) added a comment - The docs start with the instruction to run "git --version". Only when it reports a version < 1.7.6 you continue reading, expand the section, and see the instruction to install msysgit with option 3. If you installed msysgit >= 1.7.6 with option 2, running "git --version" will return a correct version, as git.cmd is found. Either the documentation should be changed to specify git.exe instead of plain git, or Stash should execute "git" instead of "git.exe".

            Our documentation explicitly states that you must install Git with "option 3", otherwise Git will not be found on the windows path.

            http://confluence.atlassian.com/display/STASH/Installing+Stash+on+Windows

            Seb Ruiz (Inactive) added a comment - Our documentation explicitly states that you must install Git with "option 3", otherwise Git will not be found on the windows path. http://confluence.atlassian.com/display/STASH/Installing+Stash+on+Windows

              pepoirot Pierre-Etienne Poirot (Inactive)
              rverschoor Rene Verschoor (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: