From 0f851344e9cffa146a01e858d45aef99c81100c5 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Sat, 13 Feb 2021 20:07:04 +0000 Subject: [PATCH] Try "ssh://"-URLs as suggested in https://github.com/webfactory/ssh-agent/issues/30#issuecomment-756007264 --- .github/workflows/demo.yml | 2 ++ dist/index.js | 1 + index.js | 1 + 3 files changed, 4 insertions(+) diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index 9561c9c..c3bb009 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -54,5 +54,7 @@ jobs: - run: | git clone https://github.com/mpdude/test-1.git test-1-http git clone git@github.com:mpdude/test-1.git test-1-git + git clone ssh://git@github.com/mpdude/test-1.git test-1-git-ssh git clone https://github.com/mpdude/test-2.git test-2-http git clone git@github.com:mpdude/test-2.git test-2-git + git clone ssh://git@github.com/mpdude/test-2.git test-2-git-ssh diff --git a/dist/index.js b/dist/index.js index a36baa4..ac64344 100644 --- a/dist/index.js +++ b/dist/index.js @@ -190,6 +190,7 @@ try { child_process.execSync(`git config --global --replace-all url."git@${sha256}:${ownerAndRepo}".insteadOf "https://github.com/${ownerAndRepo}"`); child_process.execSync(`git config --global --add url."git@${sha256}:${ownerAndRepo}".insteadOf "git@github.com:${ownerAndRepo}"`); + child_process.execSync(`git config --global --add url."git@${sha256}:${ownerAndRepo}".insteadOf "ssh://git@github.com/${ownerAndRepo}"`); let sshConfig = `\nHost ${sha256}\n` + ` HostName github.com\n` diff --git a/index.js b/index.js index 23d818a..cf7b562 100644 --- a/index.js +++ b/index.js @@ -73,6 +73,7 @@ try { child_process.execSync(`git config --global --replace-all url."git@${sha256}:${ownerAndRepo}".insteadOf "https://github.com/${ownerAndRepo}"`); child_process.execSync(`git config --global --add url."git@${sha256}:${ownerAndRepo}".insteadOf "git@github.com:${ownerAndRepo}"`); + child_process.execSync(`git config --global --add url."git@${sha256}:${ownerAndRepo}".insteadOf "ssh://git@github.com/${ownerAndRepo}"`); let sshConfig = `\nHost ${sha256}\n` + ` HostName github.com\n`