tortoisegit - Windows Git pre-commit check file signature -
i'm trying ensure specific file signed before allowing file commited. i'm using powershell this, isn't powershell issue. here's command i'm using check:
/c/windows/system32/windowspowershell/v1.0/powershell.exe -command "if ((get-authenticodesignature .\test.ps1).status -ne 'valid') { exit 1 }" note: i've tried variation of following powershell switches:
-nologo -noninteractive -noprofile at first, appeared exit code lost , 0. after further investigation, appears command doesn't run. example, here's test command:
/c/windows/system32/windowspowershell/v1.0/powershell.exe -command "get-location | out-file c:\temp\test.txt" this test command runs fine when executed gitbash shell; test.txt file created. when in pre-commit hook file, fails create test.txt file; technically tortoisegit running part.
question: on windows, how ensure specific file signed before allowing file commited? there way have gpg command use windows cert store validation of signature?
i feel tortoisegit issue, wanted bounce on all. i’ve submitted issue: https://tortoisegit.org/issue/2143
Comments
Post a Comment