mirror of
https://github.com/webfactory/ssh-agent.git
synced 2025-12-16 08:22:34 +00:00
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
This commit is contained in:
parent
a6f90b1f12
commit
76b9e14124
1 changed files with 1 additions and 1 deletions
2
index.js
2
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue