feat: add SSH commit signing to git identities

Configure commit signing per Git identity
Apply SSH signing settings automatically
Support signing in web and VS Code
This commit is contained in:
Bohdan Triapitsyn
2026-06-18 23:51:40 +03:00
parent 07e6935a3e
commit 4d63278efd
18 changed files with 198 additions and 13 deletions
+6
View File
@@ -1913,6 +1913,12 @@ export async function setLocalIdentity(directory, profile) {
await git.raw(['config', '--local', '--unset', 'core.sshCommand']).catch(() => {});
}
if (profile.signCommits === true && typeof profile.signingKey === 'string' && profile.signingKey.trim()) {
await git.addConfig('gpg.format', 'ssh', false, 'local');
await git.addConfig('user.signingkey', profile.signingKey.trim(), false, 'local');
await git.addConfig('commit.gpgsign', 'true', false, 'local');
}
return true;
} catch (error) {
console.error('Failed to set Git identity:', error);