Skip to content

add home-path input for GH runners using DynamicUser#247

Open
jakubgs wants to merge 1 commit into
webfactory:masterfrom
Develp-GmbH:home-dir-input
Open

add home-path input for GH runners using DynamicUser#247
jakubgs wants to merge 1 commit into
webfactory:masterfrom
Develp-GmbH:home-dir-input

Conversation

@jakubgs
Copy link
Copy Markdown

@jakubgs jakubgs commented May 12, 2026

When a GitHub runner is running in Systemd serivce context that is using DynamicUser=true setting the os.userInfo().homedir call returns /(root).

This happens because the Node call uses libuv which calls getpwuid() that uses the NSS(Name Service Switch) which provide home path from /etc/passwd.

Because of this the action fails with error like this:

Error: ENOENT: no such file or directory, mkdir '//.ssh'

Allowing users to override it is the simplest fix, for example like this:

home-path: $HOME

When a GitHub runner is running in Systemd serivce context that is using
DynamicUser=true setting the os.userInfo().homedir call returns /(root).

This happens because the Node call uses libuv which calls getpwuid() that
uses the NSS(Name Service Switch) which provide home path from /etc/passwd.

Because of this the action fails with error like this:

Error: ENOENT: no such file or directory, mkdir '//.ssh'

Allowing users to override it is the simplest fix, for example like this:

home-path: $HOME

Signed-off-by: Jakub Sokołowski <jakub@status.im>
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