Git - enable commit signing using SSH key (#201298)

This commit is contained in:
Ladislau Szomoru 2023-12-20 14:14:39 +01:00 committed by GitHub
parent d32043d8b8
commit b21537c2ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -168,7 +168,7 @@
"config.smartCommitChanges.all": "Automatically stage all changes.",
"config.smartCommitChanges.tracked": "Automatically stage tracked changes only.",
"config.suggestSmartCommit": "Suggests to enable smart commit (commit all changes when there are no staged changes).",
"config.enableCommitSigning": "Enables commit signing with GPG or X.509.",
"config.enableCommitSigning": "Enables commit signing with GPG, X.509, or SSH.",
"config.discardAllScope": "Controls what changes are discarded by the `Discard all changes` command. `all` discards all changes. `tracked` discards only tracked files. `prompt` shows a prompt dialog every time the action is run.",
"config.decorations.enabled": "Controls whether Git contributes colors and badges to the Explorer and the Open Editors view.",
"config.enableStatusBarSync": "Controls whether the Git Sync command appears in the status bar.",

View file

@ -46,7 +46,9 @@ function main(argv: string[]): void {
if (askpassType === 'ssh') {
if (/passphrase/i.test(request)) {
// passphrase
file = argv[6].replace(/^["']+|["':]+$/g, '');
// Commit signing - Enter passphrase:
// Git operation - Enter passphrase for key '/c/Users/<username>/.ssh/id_ed25519':
file = argv[6]?.replace(/^["']+|["':]+$/g, '');
} else {
// authenticity
host = argv[6].replace(/^["']+|["':]+$/g, '');

View file

@ -102,7 +102,7 @@ export class Askpass implements IIPCHandler, ITerminalEnvironmentProvider {
const options: InputBoxOptions = {
password: true,
placeHolder: l10n.t('Passphrase'),
prompt: `SSH Key: ${file}`,
prompt: file ? `SSH Key: ${file}` : undefined,
ignoreFocusOut: true
};