Skip to content

Cannot specify GIT binary directory #5454

Closed

Description

Description

Greetings,

The GitHub Desktop system requires an enhancement. This enhancement should enable the use of portable GIT binaries.

Version

  • GitHub Desktop:
    image
  • Operating system:
    Windows 7

Steps to Reproduce

image

Expected Behavior

image

Actual Behavior

image

Additional Information

n/a

Logs

n/a

Thanks,
coast

Activity

  1. shiftkey commented on Aug 23, 2018

    @shiftkey
    Member

    @mancoast thanks for the report.

    Two things to add to what you've shared here:

    • I gather you have installed Git for Windows but chosen to not add Git to your PATH, which is the warning that is displayed here. I talked about this over in not all shells require Git to be on PATH #5358 because Git Bash doesn't need to check this.
    • Command Prompt here is just a plain CMD prompt, not the enhanced "Git CMD" prompt you point to within the Git for Windows install. Can you share why you prefer that over the plain CMD?
  2. shiftkey commented on Aug 23, 2018

    @shiftkey
    Member

    The systems require an enhanced "Git CMD" prompt due to lack of admin rights to install/modify the systems' Path environment variable.

    You can change environment variables for your account without needing admin rights like this:

    I went through these steps to test how Desktop works with a portable Git install:

    • downloading the latest PortableGit archive and extracting it to C:\Users\shiftkey\Desktop\PortableGit

    • finding the Path environment variable for my current user and selecting "Edit":

    • adding C:\Users\shiftkey\Desktop\PortableGit\cmd\ to my user's PATH environment variable (don't forget the cmd here!)

    • launch GitHub Desktop again and launch Open in Command Prompt

    • no error, and git now works

    For the moment we don't plan to add a "Locate Git" option here, and instead rely on the user to setup PATH (this works for all OSes Desktop runs on currently) so I'm going to close this out as "by design".

    If the pain here ends up with more issues like this it suggests that we need to revisit this dialog and make it clear what we're looking for.

  3. lmstearn commented on Oct 22, 2022

    @lmstearn

    Thanks, changing the PATH worked.
    A Locate Git button isn't a bad idea, might be a bit of work changing the PATH string for Git via the registry though. These days, altering such registry keys isn't de rigeur, and usually requires account elevation (perhaps even as a dedicated child process after install), which explains why the Git clients don't do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions