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
{{ message }}
Repository navigation
local hooks stopped working after updating to latest verison. #18739
local hooks stopped working after updating to the latest version (Version 3.4.0 (x64)).
The command line works without problems, but it fails to find Python when using the GitHubDesktop GUI.
Error message: "/usr/bin/env: ‘python’: No such file or directory"
Release version
Version 3.4.0 (x64)
Operating system
Windows 10
Steps to reproduce the behavior
Create local hook that uses python.
path: .git/hooks/prepare-commit-msg
And try commit using GitHubDesktop.
Log files
No response
Screenshots
Additional context
No response
Reacted by Cheng Chi, Michael Matloka, ciso-davidpham, Mathew Heard, Florian Bastien-Dorville, gprovostqa, Maya, Andrew Welch, Kevin, Stanleyei and 9 more
My pre-commit hooks also failed after updating to 3.4.0 in Windows. I get command not found for the tools that used to work, e.g. npm, yarn. I have been attempting fixes related to path C:\Program Files\Git\bin and the import order without any luck. Following this thread now for any more ideas.
Reacted by ciso-davidpham, Ben Collins, gprovostqa and Kapil As
My pre-commit hooks also failed after updating to 3.4.0 in Windows. I get command not found for the tools that used to work, e.g. npm, yarn. I have been attempting fixes related to path C:\Program Files\Git\bin and the import order without any luck. Following this thread now for any more ideas.
I have same problem after updating to 3.4.0 in Windows!
Same issue, wsl2 pre-commit hooks working just fine until this latest update, I've checked the environment variables and everything is setup correctly, pointing to where the git binary is in AppData, getting
'/usr/bin/env: ‘bash’: No such file or directory'
👋 The embedded version of Git was recently updated for security reasons. Does anyone have the latest version (2.45.2) Git installed and can successfully run the hooks from the command line?
I have the latest git 2.45.2 on windows and I have the latest github desktop version 3.4.0 and I'm still having the same issues where any command I use in a git hook will result in a command not found error
@fbastien It only occurs within the github desktop app. When I make a commit via the terminal the husky hooks run successfully and I face no issues.
I even installed Atlassian Sourcetree to test it out and I faced no issues. So I'm 100% confident the issue is strictly happeniing when I try to make a commit with the Github Desktop app.
Hello,
maybe this will help someone, I ran into the issue of command not found after I updated to 3.4.0, I spent most of yesterday trying to get it to work with no success, at the end, I deleted the local repository, and cloned it from remote, everything is back to normal, I could commit, merge, and everything expected from GithubDesktop is working
so delete your repository ( you can commit your work from CLI ) and clone a new one
Hello, maybe this will help someone, I ran into the issue of command not found after I updated to 3.4.0, I spent most of yesterday trying to get it to work with no success, at the end, I deleted the local repository, and cloned it from remote, everything is back to normal, I could commit, merge, and everything expected from GithubDesktop is working so delete your repository ( you can commit your work from CLI ) and clone a new one
In the case you use Husky, you just "uninstalled it" so, it's not a real fix, you need to run again npm run prepare (or something like that) and then the error will show up again...
I used to have this issue in v3.4.16. I upgraded to v3.4.18 (arm64, on a Mac) and commit just worked. Nothing in the release notes about it, but I'm glad it's fixed now 👍
Activity
andylwelch commentedon Jun 3, 2024
My pre-commit hooks also failed after updating to
3.4.0in Windows. I getcommand not foundfor the tools that used to work, e.g.npm,yarn. I have been attempting fixes related to pathC:\Program Files\Git\binand the import order without any luck. Following this thread now for any more ideas.ivoyip1101 commentedon Jun 3, 2024
I have same problem after updating to 3.4.0 in Windows!
jroach-cordel commentedon Jun 3, 2024
I'm running into this issue when trying to run pwsh.exe as well.
CassBaylock commentedon Jun 3, 2024
Same issue here. I have to use the exact file path in my hooks for it to work now.
ciso-davidpham commentedon Jun 3, 2024
Same issue, wsl2 pre-commit hooks working just fine until this latest update, I've checked the environment variables and everything is setup correctly, pointing to where the git binary is in AppData, getting
'/usr/bin/env: ‘bash’: No such file or directory'
splitice commentedon Jun 4, 2024
Best part is github in all their wisdom doesnt publish older builds. So if you get auto-updated to a broken version you better find a new client.
andylwelch commentedon Jun 4, 2024
I found this download url worked for v3.3.18. Also, rename the
Update.exeand it will break the auto-update process...glundgren93 commentedon Jun 4, 2024
I think this could've been the root cause.
#18676
tidy-dev commentedon Jun 4, 2024
👋 The embedded version of Git was recently updated for security reasons. Does anyone have the latest version (2.45.2) Git installed and can successfully run the hooks from the command line?
TheMikeyRoss commentedon Jun 4, 2024
I have the latest git
2.45.2on windows and I have the latest github desktop version3.4.0and I'm still having the same issues where any command I use in a git hook will result in acommand not founderrorfbastien commentedon Jun 4, 2024
@TheMikeyRoss With your setup, does this error only occur within GitHub Desktop, or does it also occur when executing
git commitcommand lines?TheMikeyRoss commentedon Jun 4, 2024
@fbastien It only occurs within the github desktop app. When I make a commit via the terminal the husky hooks run successfully and I face no issues.
I even installed Atlassian Sourcetree to test it out and I faced no issues. So I'm 100% confident the issue is strictly happeniing when I try to make a commit with the Github Desktop app.
fbastien commentedon Jun 4, 2024
Thanks for the clarification
master-lou commentedon Jun 4, 2024
Hello,
maybe this will help someone, I ran into the issue of command not found after I updated to 3.4.0, I spent most of yesterday trying to get it to work with no success, at the end, I deleted the local repository, and cloned it from remote, everything is back to normal, I could commit, merge, and everything expected from GithubDesktop is working
so delete your repository ( you can commit your work from CLI ) and clone a new one
asfo commentedon Jun 4, 2024
In the case you use Husky, you just "uninstalled it" so, it's not a real fix, you need to run again
npm run prepare(or something like that) and then the error will show up again...21 remaining items
east-shine commentedon Jun 20, 2024
@tidy-dev I'm still having issues with version 3.4.1(arm64)
tidy-dev commentedon Jun 20, 2024
@east-shine I am sorry to hear that. It is likely a different root cause. Could you open a new issue to track it? (Please remember to include logs)
exde37b2 commentedon Jun 28, 2024
maybe this helps others.
Having in use 3.4.1, I had run
nvm install fancy.new.version
nvm use fancy.new.version
and ended up with the same problem described above. After running
nvm use good.old.version
GitHubDesktop is working again
rmckr commentedon Jun 30, 2024
Have you checked the official Husky instructions for use with NVM?
https://typicode.github.io/husky/how-to.html#node-version-managers-and-guis
thecloudsingh commentedon Jul 16, 2024
This issue is with GitHub desktop. When I commit from CLI, it works. I just downgraded GitHub Desktop and it works but does not work with 3.4.2
jflemingframe commentedon Jul 17, 2024
still happening to me
hqxc-bacon commentedon Aug 9, 2024
hqxc-bacon commentedon Aug 9, 2024
I still have the problem and the solutions above don't fix it
Drumstix42 commentedon Aug 19, 2024
Also still having the issue here. Works in CLI, works in VSCode, broken in Github Desktop. Used to work in Github Desktop just fine.
Weirdly this comment helps #12586 (comment) but it's not a great solution, as it makes the change OS specific...
petter-eikeland commentedon Aug 25, 2024
I am also having this issue on 3.4.3 ARM version (Apple Silicon). Downgrading to v. 3.3.18 fixed the issue for me
octavemuhirwa commentedon Oct 3, 2024
I am also having this issue on 3.4.5 (arm64) apple m2.
pidark commentedon Oct 16, 2024
I have the same issue Version 3.4.4 on Ubuntu 24.10.
I've solved editing /usr/share/applications/github-desktop.desktop
[Desktop Entry]
Name=GitHub Desktop
Comment=Simple collaboration from your desktop
GenericName=GitHub Desktop
Exec=bash -c "PATH=MY_PATH github-desktop"
Icon=github-desktop
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Utility;
MimeType=x-scheme-handler/x-github-client;x-scheme-handler/x-github-desktop-auth;x-scheme-handler/x-github-desktop-dev-auth;
Where you can find MY_PATH and replace it with
echo $PATHon terminal.
Hope this help someone.
ColeDCrawford commentedon Dec 16, 2024
Yep, this is still an issue on 3.4.9 (Mac M1)
toyota-167 commentedon Jan 23, 2025
i got the same issue like this and i fix it by follow your solution, and the error is gone. thanks a lot for you.
thelsevier commentedon Mar 11, 2025
I used to have this issue in v3.4.16. I upgraded to v3.4.18 (arm64, on a Mac) and commit just worked. Nothing in the release notes about it, but I'm glad it's fixed now 👍