You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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.
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.
Activity
shiftkey commentedon Aug 23, 2018
@mancoast thanks for the report.
Two things to add to what you've shared here:
Command Prompthere 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?shiftkey commentedon Aug 23, 2018
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\PortableGitfinding the
Pathenvironment variable for my current user and selecting "Edit":C:\Users\shiftkey\Desktop\PortableGit\cmd\to my user's PATH environment variable (don't forget thecmdhere!)Open in Command Promptgitnow worksFor 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.
lmstearn commentedon Oct 22, 2022
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.