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

Support SSH agent fwd for actionrunner on macos #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

k-willowhawk
Copy link

No description provided.

@CLAassistant
Copy link

CLAassistant commented Jul 1, 2022

CLA assistant check
All committers have signed the CLA.

@k-willowhawk
Copy link
Author

This is needed if packs are to be installed from private Git repos, and allows the action runner to leverage the SSH key forwarding agent from the host so we don't need to load private keys on disposable docker containers.

The socket path is specific to macOS (newer versions at that).

Reference I used to modify this: https://stackoverflow.com/questions/27036936/using-ssh-agent-with-docker-on-macos

volumes:
- /run/host-services/ssh-auth.sock:/ssh-agent
Copy link
Member

Choose a reason for hiding this comment

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

Can you do something more generic?
On my linux box I have something like:
SSH_AUTH_SOCK=/tmp/ssh-XXXXXXs4KUHi/agent.1234

So, is there a way to avoid hard-coding this path?

Copy link
Member

Choose a reason for hiding this comment

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

I don't know docker-compose very well, but would something like this work?

Suggested change
- /run/host-services/ssh-auth.sock:/ssh-agent
- ${SSH_AUTH_SOCK:-/run/host-services/ssh-auth.sock}:/ssh-agent

Copy link
Member

Choose a reason for hiding this comment

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

+1.

Another thought is how to make it optional?

I'm thinking that majority of the users might not need these volume mounts by default
So we avoid sharing the ssh auth socket with st2 unless configured.

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.

4 participants