From 3715bc571d832bd0288cc44fa689a6a967d7a940 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Tue, 2 Mar 2021 18:30:41 +0000 Subject: [PATCH] Use IdentitiesOnly=yes, because on Windows the wrong key was sent first (_but_: taken from the Agent) --- dist/index.js | 4 ++-- index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 0b4fae7..7bb7c74 100644 --- a/dist/index.js +++ b/dist/index.js @@ -219,12 +219,12 @@ try { // On Linux and OS X, IdentitiesOnly=no will send all keys from agent before the explicit key, so use "yes". // On Windows, IdentitiesOnly=yes will ignore keys from the agent, but send explicit keys first; so use "no" (https://github.com/PowerShell/Win32-OpenSSH/issues/1550) - let identitiesOnly = isWindows ? 'no' : 'yes'; + //let identitiesOnly = isWindows ? 'no' : 'yes'; let sshConfig = `\nHost key-${keyNumber}\n` + ` HostName github.com\n` + ` User git\n` - + ` IdentitiesOnly ${identitiesOnly}\n` + + ` IdentitiesOnly yes\n` + ` AddKeysToAgent yes\n` + ` IdentityFile ${keyFile}\n`; diff --git a/index.js b/index.js index 1e881ea..3ee2ca1 100644 --- a/index.js +++ b/index.js @@ -102,12 +102,12 @@ try { // On Linux and OS X, IdentitiesOnly=no will send all keys from agent before the explicit key, so use "yes". // On Windows, IdentitiesOnly=yes will ignore keys from the agent, but send explicit keys first; so use "no" (https://github.com/PowerShell/Win32-OpenSSH/issues/1550) - let identitiesOnly = isWindows ? 'no' : 'yes'; + //let identitiesOnly = isWindows ? 'no' : 'yes'; let sshConfig = `\nHost key-${keyNumber}\n` + ` HostName github.com\n` + ` User git\n` - + ` IdentitiesOnly ${identitiesOnly}\n` + + ` IdentitiesOnly yes\n` + ` AddKeysToAgent yes\n` + ` IdentityFile ${keyFile}\n`;