Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] overwrites the authorized_keys file in self-hosted gh runner #177

Open
yatharthranjan opened this issue Oct 2, 2023 · 0 comments
Open

Comments

@yatharthranjan
Copy link

Hi,

We are using a self-hosted GH runner and seems like we lost SSH access to our instance because this action overwrites the authorized_keys files when limit-access-to-actor set to true. I think it is because of this line

await fs.promises.writeFile(authorizedKeysPath, keys.data.map(e => e.key).join('\n'))

This might be fine on GH hosted runners as they are ephermeral, but for self-hosted runner we have a single instance which is re-used across multiple runs. For this we need SSH access to configure and administer the instance and overwriting SSH keys is not useful. For now we have changed to a new user specific for running the GH runner application so it does not interfere with our primary user account.

I think this should be updated to append to the authorized_keys file instead of replacing it. So any existing keys will also work. Thanks.

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

No branches or pull requests

1 participant