From 76b9e1412463eab559725c8c0c3a9ec96f545aba Mon Sep 17 00:00:00 2001 From: Julian Hille Date: Fri, 19 Sep 2025 09:33:17 +0200 Subject: [PATCH] Change the identify file path from hardcoded absolute to user based ## Issue The issue is that a hardcoded full path is in a github action something like `/home/runner` if you need that file inside of a docker build system you can not simply mount that file into the container. You need to copy the file, sed it (string replace) and then mount it. If we would use something like a "home dir" placeholder this would work out of the box. Not sure if ~ works in all cases but %d should. https://linux.die.net/man/5/ssh_config --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index d28a764..746c12d 100644 --- a/index.js +++ b/index.js @@ -66,7 +66,7 @@ try { const sshConfig = `\nHost key-${sha256}.github.com\n` + ` HostName github.com\n` - + ` IdentityFile ${homeSsh}/key-${sha256}\n` + + ` IdentityFile ~/.ssh/key-${sha256}\n` + ` IdentitiesOnly yes\n`; fs.appendFileSync(`${homeSsh}/config`, sshConfig);