Signtool with git bash or powershell

Anyone using git bash to do their ci / building?

I’ve just gotten a windows cert, I’m attempting to set up code signing for a project using ci. I have a .sh script on windows which builds, packages, etc the plugins – when I go to code sign via something like:

"$SIGN_TOOL" sign /t "http://timestamp.comodoca.com" "$FINAL_EXE"

I get:

Number of files successfully Signed: 1
Number of errors: 2
SignTool Error: File not found: T:/
SignTool Error: File not found: http://timestamp.comodoca.com

It seems like it’s parsing the arguments incorrectly? is this still the current way to do this?

Thanks for any assistance!

J

Apologies… scratch that… It appears you can’t use signtool in git bash for some reason, applying the same script in powershell works

FWIW if you prefer to use Git Bash, it looks like you can change /t to //t in order to avoid it being interpreted as a filepath by the Git Bash emulator:

2 Likes

Oh man good find! Thank you!

I was using signtool in Git Bash on Windows and it simply used to work replacing the “/” with “-” for argument switches, e.g. “-f” instead of “/f” to pass the certificate files, so I expect that you can also use “-t” in place of “/t” if that better suits your style.