DEV Community

Discussion on: Signed Git commits in VS Code

Collapse
 
nicolaerario profile image
Nicola Erario

In reality, I haven’t to import nothing: after the key are created, go straight to “set up git” section; to setup GitHub, then, with the command gpg —armor —export you can copy/paste the public key to GitHub settings. Furthermore I discovered that git on windows came bundled with own gpg executable so, using your guide with git bash, the “Error: secret key not available” section is useless (git can commit without to declare the path because it uses its own). Last trick: you can leave the pass phrase blank so you don’t need to write it to commit. Ps: sorry for the formatting, I’m on mobile

Thread Thread
 
devmount profile image
Andreas • Edited

Thank you Nicola, I've updated the post accordingly! The "import" part now covers the key creation case and gpg --armor --export command.

Yes, if you don't have any issues with this error message, you don't have to specify the path. It was just meant for those, who are facing the same problem as I did.

I wouldn't recommend using a private key without a passphrase for security reasons. But yes, you're right: you don't have to use a passphrase.