From c77dd5afd7adea9102906fd4a747cb90d7a34d42 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Tue, 2 Mar 2021 16:11:15 +0000 Subject: [PATCH] ... --- .github/workflows/demo.yml | 4 +--- dist/index.js | 2 +- index.js | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index 2b08dba..b65aada 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -44,7 +44,6 @@ jobs: deployment_keys_demo: env: GIT_SSH_COMMAND: ssh -v - DISPLAY: fake strategy: fail-fast: false matrix: @@ -59,9 +58,8 @@ jobs: ${{ secrets.MPDUDE_TEST_1_DEPLOY_KEY }} ${{ secrets.MPDUDE_TEST_2_DEPLOY_KEY }} - run: | + cat ~/.ssh/config git clone git@github.com:mpdude/test-2.git test-2-git - -# cat ~/.ssh/config # ls -alh ~/.ssh # git clone https://github.com/mpdude/test-1.git test-1-http # git clone git@github.com:mpdude/test-1.git test-1-git diff --git a/dist/index.js b/dist/index.js index 282eff2..13153bf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -221,11 +221,11 @@ try { // 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'; - // Use IdentitiesOnly=no due to https://github.com/PowerShell/Win32-OpenSSH/issues/1550 let sshConfig = `\nHost key-${keyNumber}\n` + ` HostName github.com\n` + ` User git\n` + ` IdentitiesOnly ${identitiesOnly}\n` + + ` AddKeysToAgent yes\n` + ` IdentityFile ${keyFile}\n`; fs.appendFileSync(`${homeSsh}/config`, sshConfig); diff --git a/index.js b/index.js index 85338c7..41be448 100644 --- a/index.js +++ b/index.js @@ -104,11 +104,11 @@ try { // 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'; - // Use IdentitiesOnly=no due to https://github.com/PowerShell/Win32-OpenSSH/issues/1550 let sshConfig = `\nHost key-${keyNumber}\n` + ` HostName github.com\n` + ` User git\n` + ` IdentitiesOnly ${identitiesOnly}\n` + + ` AddKeysToAgent yes\n` + ` IdentityFile ${keyFile}\n`; fs.appendFileSync(`${homeSsh}/config`, sshConfig);