It is probably a shell path issue. the KM shell script does NOT use your normal path you see via Terminal. Seems like we talked about this before. Look in the KM Wiki under Execute Shell Script.
I forgot about providing the full paths to external commands. My bad.
Now it actually commits and adds them but can’t push.
I get an error :
git credential-osxkeychain is not a git command
I googled everything and I can’t find a solution to this. The thing is that I sign my commits with GPG and since KM can’t read my configs, I guess I get these errors.
I tried setting my PATH variable to what I have in my shell too but still get the same error.
You are probably running two different git commands.
In the Terminal, when git works, run the command:
which git
and it will tell you which git command you are running.
Make sure you are running that command in your shell script in Keyboard Maestro.
An alternative is that there are other environment variables in the Terminal that are not set in Keyboard Maestro. See the wiki: Path in Shell Scripts and it applies to the PATH as well as any other environment variables that the git command might be using.
My guess is that git credential-oxskeychain is calling some sort of sub-command, which it is finding in that path somewhere, and without those path entries, it’s not finding the command, and therefore failing.
I’d be tempted to set the PATH explicitly within the Execute Shell Script. I’d also be tempted to understand all the entries in the PATH and why they are there.
It reminds me of Windows Registry, where every app install put a ton of junk in the Registry.
IMO, you need to find someone (a shell/bash expert) to look at your system and help you clean up your path. A path of that length and complexity can’t help but slow things down, and maybe even cause confusion by the command line tools that use the path.
But before you start this, be sure to save the existing path.