Skip to content

Conversation

julianhille
Copy link

@julianhille julianhille commented Sep 19, 2025

Issue

The issue is that a hardcoded full path of the identity file inside of the ssh config is in case of a github action run 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

## 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
@@ -66,7 +66,7 @@ try {

const sshConfig = `\nHost key-${sha256}.github.amrom.workers.dev\n`
+ ` HostName github.com\n`
+ ` IdentityFile ${homeSsh}/key-${sha256}\n`
+ ` IdentityFile ~/.ssh/key-${sha256}\n`
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ ` IdentityFile ~/.ssh/key-${sha256}\n`
+ ` IdentityFile %d/.ssh/key-${sha256}\n`

this might/should also work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant