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

Add env var check for Windows ssh-agent pipe name #312

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

jborean93
Copy link
Contributor

Adds logic to use the SSH_AUTH_SOCK environment variable when selecting the SSH Agent named pipe on Windows. If the env var is unset then the default openssh-ssh-agent is used instead.

It turns out that ssh.exe or other tools like ssh-add.exe on Windows will use the value of SSH_AUTH_SOCK env var so this change replicates that behaviour. It also adds some extra checks on the value to ensure it is in the form or \\.\pipe\....

Adds logic to use the SSH_AUTH_SOCK environment variable when selecting
the SSH Agent named pipe on Windows. If the env var is unset then the
default openssh-ssh-agent is used instead.
@tmds
Copy link
Owner

tmds commented Jan 5, 2025

Thanks for the improvements, @jborean93!

@tmds tmds merged commit a1c42f1 into tmds:main Jan 5, 2025
1 check passed
@jborean93 jborean93 deleted the win-ssh-agent-name branch January 5, 2025 17:13
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.

2 participants