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

[Feature] (for Windows) Add PuTTY / Plink support as an optional method for SSH agent #242

Open
LiarOnce opened this issue Jul 5, 2024 · 5 comments
Assignees
Labels
help-wanted Extra attention is needed suggestion We are still considering whether it is necessary to add this feature

Comments

@LiarOnce
Copy link

LiarOnce commented Jul 5, 2024

OpenSSH's ssh-agent may have difficult to troubleshoot functional issues in Windows, and PuTTY can be used as an alternative solution for SSH agents.

@love-linger love-linger self-assigned this Jul 7, 2024
@love-linger love-linger added suggestion We are still considering whether it is necessary to add this feature help-wanted Extra attention is needed labels Jul 8, 2024
@love-linger
Copy link
Collaborator

I have not used PuTTY before, can you explain the differences between it and OpenSSH in use?

@LiarOnce
Copy link
Author

LiarOnce commented Jul 8, 2024

On Windows, PuTTY uses Pageant as the key manager and Plink for connectivity. Instead of using system services like OpenSSH, you can just run Pageant in the background.

All components of PuTTY are portable apps.

image
(When using PuTTY as an SSH client in SourceTree)

@love-linger
Copy link
Collaborator

I'm using the following command to specify the private key for a remote:

git -c core.sshCommand="ssh -i '${sshKey}' fetch/pull/push"

What is its equivalent in PuTTY?

Another question, when enable commit GPG signing with SSH method, what do I need to be aware of as opposed to OpenSSH?

image

@LiarOnce
Copy link
Author

LiarOnce commented Jul 8, 2024

I'm not sure how to use Plink for individual repositories, but generally it's used in the form of a global setting:

git config --global core.sshCommand 'plink -ssh'

And it uses this command to use the private key:

plink -ssh -i <putty_key_file>.ppk

The .ppk file here is the PuTTY Private Key format, and it can also be exported as a private key in OpenSSH format.

Regarding GPG, there is no need to pay attention to anything because neither PuTTY nor OpenSSH affects the GPG signing.

@love-linger
Copy link
Collaborator

I'm not sure how to use Plink for individual repositories, but generally it's used in the form of a global setting:

git config --global core.sshCommand 'plink -ssh'

And it uses this command to use the private key:

plink -ssh -i <putty_key_file>.ppk

The .ppk file here is the PuTTY Private Key format, and it can also be exported as a private key in OpenSSH format.

Regarding GPG, there is no need to pay attention to anything because neither PuTTY nor OpenSSH affects the GPG signing.

Thanks very much. Let me think about how to achieve this feature later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted Extra attention is needed suggestion We are still considering whether it is necessary to add this feature
Projects
None yet
Development

No branches or pull requests

2 participants