mirror of
https://github.com/webfactory/ssh-agent.git
synced 2024-12-24 15:59:36 +00:00
Use IdentitiesOnly=yes, because on Windows the wrong key was sent first (_but_: taken from the Agent)
This commit is contained in:
parent
71155bedbe
commit
3715bc571d
2 changed files with 4 additions and 4 deletions
4
dist/index.js
vendored
4
dist/index.js
vendored
|
@ -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`;
|
||||
|
||||
|
|
4
index.js
4
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`;
|
||||
|
||||
|
|
Loading…
Reference in a new issue