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 support for Pageant as SSH agent #133

Merged
merged 8 commits into from
May 15, 2014
Merged

Add support for Pageant as SSH agent #133

merged 8 commits into from
May 15, 2014

Conversation

theaquamarine
Copy link
Collaborator

Adds support to use Pageant as SSH agent rather than ssh-agent. Starts Pageant if not running on PowerShell launch and loads keys from ~/.ssh. Also allows helper functions to function with Pageant.

Requires Pageant to be in the path for it to be launched.

On PowerShell launch, check to see if GIT_SSH exists and is set to
plink. If so, check to see if pageant is running and return if it is.
If pageant is not running, attempt to start it and load all .ppk
files stored in ~/.ssh

Requires pageant to be on path for it to be launched.
Also changes Start-SshAgent() to use Add-SshKey() for both agents.
Also changes gets some information in a more intelligent manner.
Make paths for Pageant and ssh-agent more alike.
} else {
setenv 'SSH_AGENT_PID', $null
setenv 'SSH_AUTH_SOCK', $null
if ($env:GIT_SSH -and $env:GIT_SSH.toLower().Contains('plink')) {
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe if ($Env:GIT_SSH -imatch 'plink')?

@dahlbyk
Copy link
Owner

dahlbyk commented Feb 20, 2014

Thanks for this!

dahlbyk added a commit that referenced this pull request May 15, 2014
Add support for Pageant as SSH agent
@dahlbyk dahlbyk merged commit 3874a02 into dahlbyk:master May 15, 2014
@dahlbyk
Copy link
Owner

dahlbyk commented May 15, 2014

Thanks!

@theaquamarine theaquamarine deleted the pageant branch May 18, 2014 11:14
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