gittuf / gittuf

A security layer for Git repositories
https://gittuf.dev
Apache License 2.0
439 stars 28 forks source link

Test encrypted ssh keys on Windows #422

Open lukpueh opened 3 weeks ago

lukpueh commented 3 weeks ago

Add a description

414 adds a new ssh package with API to import public ssh keys and create signatures using the ssh-keygen command.

To mock the password prompt, when signing with an encrypted key, we point the SSH_ASKPASS environment variable to a shell script that returns the test key password. This currently only works on linux and macOS.

On Windows you have to jump through some extra hoops to do this. Inspiration may be taken from test suite of the Windows OpenSSH fork.

Also note that the SSH_ASKPASS_REQUIRE does not seem to be available in the ssh version shipped with windows-latest GHA runner (see this stack exchange thread for more infos). Easiest thing might be to just get a newer openssh version from chocolatey.

Relevant log output if the discussion pertains to existing gittuf functionality

No response

Code of Conduct