Skip to content

Instantly share code, notes, and snippets.

@mattn
Created November 6, 2008 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/22576 to your computer and use it in GitHub Desktop.
Save mattn/22576 to your computer and use it in GitHub Desktop.
@echo off
if not "%SSH_AGENT_PID%" == "" goto end
for /f "eol=; tokens=1,2 delims==;" %%1 in ('ssh-agent.exe') do (
if "%%1" == "SSH_AUTH_SOCK" set SSH_AUTH_SOCK=%%2
if "%%1" == "SSH_AGENT_PID" set SSH_AGENT_PID=%%2
)
ssh-add
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment