Git needs to be installed.
(Optional) OpenSSH for Windows.
Using OpenSSH for Windows is highly recommended when using a signing key with a passphrase as we will want to load it with the RDM key agent. Otherwise we would be asked for the passphrase every time we commit which is very inconvenient.
To install OpenSSH for Windows on Windows 11, go to System - Optional features.
Check that OpenSSH Client is installed. Otherwise it can be found and installed with the blue button View features.
Open the Services in Windows.
Set the startup type of OpenSSH Authentication Agent to Automatic and start the service.
Open the SSH key agent by clicking Tools - SSH Key Agent in the ribbon of Remote Desktop Manager.
Set the mode to OpenSSH and start the agent.
Generate the SSH key using the ssh-keygen.
ssh-keygen -t ed25519 -C "your_email@example.com"
-
Open the SSH Key Manager (local).
-
Select the key and click on Use for Git commit signing.
-
The git commit signing window opens.
-
Check both Sign commits by default and Configure Git to use OpenSSH for Windows.
Git commit signing -
The key needs to be added in the Git provider. To do so, open Github.
-
Go to Settings - SSH and GPG keys.
-
Click New SSH key.
Settings - SSH and GPG keys - New SSH key -
Signing key needs to be selected as the key type.
Signing key needs to be selected as the key type To learn how to use SSH keys on Github, Gitlab, and Bitbucket, click on the links below:
-
Do a commit. If a passphrase is required to access the SSH key, it will be requested at that point.
-
To verify that our commit is correctly signed, please refer to the Commits page on GitHub. Commits signed with a known key will display a Verified label.
To avoid the need to type the passphrase for every commit, the key can be loaded into the key manager.
In the SSH Key Manager (local), select the key and use the Load in SSH key agent option. An additional option is available to automatically load the key when the key agent starts.
If the key has a passphrase, a prompt will appear to enter it when the key is loaded.
Set up the environment to avoid enter the passphrase.
To do so, import the key in a vault using the Save as entry action.
On the entry, set the passphrase and check Save passphrase.
Check Automatically load to SSH key agent in the SSH key agent.