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

Spin off SSH Agent module? #338

Closed
dahlbyk opened this issue Dec 30, 2016 · 27 comments
Closed

Spin off SSH Agent module? #338

dahlbyk opened this issue Dec 30, 2016 · 27 comments

Comments

@dahlbyk
Copy link
Owner

dahlbyk commented Dec 30, 2016

As I alluded to in #328 (comment), a nontrivial number of issues and open PRs here are dedicated to managing ssh-agent and Pageant.

Since that problem has nothing to do with Git other than Git for Windows being a common distribution path for MSYS, I'd like to spin the SSH Agent bits off into a separate module. Is anyone interested in taking that on?

cc people who have tried to contribute SSH fixes: @theaquamarine (#133) @paulmarsy (#162) @c-mu (#195) @hjoelr (#297) @StefanScherer (#238) @Ventajou (#148) @nitin88 (#295)

@dahlbyk dahlbyk added this to the v1.0 milestone Dec 30, 2016
@dahlbyk
Copy link
Owner Author

dahlbyk commented Dec 30, 2016

Also cc @pcx (#155) @GrahamTheCoder (#211) @kayukin (#316)

@pcx
Copy link

pcx commented Dec 31, 2016

@dahlbyk I guess you wanted to cc: @pxc :)

@dahlbyk
Copy link
Owner Author

dahlbyk commented Dec 31, 2016

@dahlbyk I guess you wanted to cc: @pxc :)

I suppose I did. You're welcome to help, too. 😉

@rkeithhill
Copy link
Collaborator

rkeithhill commented Feb 20, 2017

@dahlbyk do you want to host this? If so, what would we call it? posh-git-ssh? There is already a posh-ssh on the PowerShell Gallery but it doesn't seem to deal with the agent or keys.

Also, will the upcoming Win32-OpenSSH implementation impact this?

@dahlbyk
Copy link
Owner Author

dahlbyk commented Feb 21, 2017

@dahlbyk do you want to host this? If so, what would we call it? posh-git-ssh? There is already a posh-ssh on the PowerShell Gallery but it doesn't seem to deal with the agent or keys.

I might as well. @drusellers suggested posh-sshit, but that may be slightly inappropriate. Maybe posh-ssh-agent? Twitter can decide.

Also, will the upcoming Win32-OpenSSH implementation impact this?

Several of the open issues here are or have been about Win32-OpenSSH, so yes that's in scope.

@rkeithhill
Copy link
Collaborator

+1 for posh-ssh-agent.

@nitin88
Copy link

nitin88 commented Feb 22, 2017

I am very bad at naming 😛
posh-ssh-agent sounds good 👍

@tamj0rd2
Copy link

tamj0rd2 commented Jun 8, 2017

Has anything happened with this? I'd be down to work on it

@dahlbyk
Copy link
Owner Author

dahlbyk commented Jun 8, 2017

Thanks for the offer, @tamj0rd2! Nobody is actively working on this, as far as I know.

Before we spawn off a new repo, it seems like a good idea to try to review/merge the four existing Pull Requests. Do you want to start by taking a look at those, and bringing them up-to-date (conflicts everywhere!) if the changes are good? My time is relatively limited at the moment, but I'm glad to help and answer questions as I'm able.

@nitin88
Copy link

nitin88 commented Jan 11, 2018

I am not sure whether we should support this anymore for windows.
Currently Windows git client ships with git-credential-manager written by Microsoft. It's more reliable and much better compared to ssh-agent in Windows.

@dahlbyk
Copy link
Owner Author

dahlbyk commented Jan 11, 2018

git-credential-manager is great for HTTPS, but as far as I know it doesn't handle SSH keys: microsoft/Git-Credential-Manager-for-Windows#25. I did find https://github.com/elsteelbrain/ssh-agent-helper via that issue.

At this point I'm tempted to just drop the ssh-agent helpers from 1.0.0 and deal with complaints (if any). Maybe someone will be motivated to pick up where we've left off here?

@nitin88
Copy link

nitin88 commented Jan 11, 2018

HTTPS is the way. We should discourage someone using HTTP ;)
Yes. Indeed we should decouple ssh-agent and poshgit

I can pickup given that once we clean out this from poshgit and see what we are going to miss/what we need from this

@JeremySkinner
Copy link
Collaborator

JeremySkinner commented Jun 14, 2018

Hi @dahlbyk et al, as I mentioned on twitter I'm planning to do some work on this over the weekend.

This is what I'm currently thinking:

  • I'll add support for win10 1803 openssh (Windows 10 version 1803 broke my ssh-agent #583)
  • Even though win10 provides its own ssh-agent now, I think we should still provide this functionality. There may be legitimate reasons that users may want to run the openssh that ships as part of git for windows, or pageant.
  • I'll split up sshutils.ps1 into a separate module remove posh-git's dependency on it
  • Where do we want to host the module? I'm happy to host it under my github account, or you can host it under yours. Let me know.
  • I'll try and increase the test coverage while I'm at it

If anyone else has any thoughts on this please let me know

I'll post updates on this issue.

@JeremySkinner
Copy link
Collaborator

JeremySkinner commented Jun 14, 2018

Current progress: #585

@rkeithhill
Copy link
Collaborator

The primary advantages I see with the Windows the openssh ssh-agent is that A) because it runs as a service, I don't have to configure PowerShell to start the agent. The agent is always running. And B), I don't have to launch my dev tools (Visual Studio) from PowerShell in order for them to work with the ssh-agent. I can launch Visual Studio from my taskbar - which is how I prefer to do that.

@dahlbyk
Copy link
Owner Author

dahlbyk commented Jun 14, 2018

For starters, I'm inclined to fix up the low-hanging SSH stuff (at least #583, maybe look at the open PRs assigned to the SSH Agents milestone?) in the v0 branch for a v0.8 release.

Once that's stable, we can cut it loose into a separate module and drop it from master here for the next v1 beta.

Where do we want to host the module? I'm happy to host it under my github account, or you can host it under yours. Let me know.

No preference. I can create a repo here, we can use a repo of your own, or we can see about hosting it under PoshCode.

@rkeithhill
Copy link
Collaborator

Also, it would actually be nice to have native argument completion for ssh, ssh-keygen, ssh-keyscan, ssh-add, sftp, and scp. :-)

@JeremySkinner
Copy link
Collaborator

Also, it would actually be nice to have native argument completion for ssh, ssh-keygen, ssh-keyscan, ssh-add, sftp, and scp. :-)

It would! I'd like to address that too.

For starters, I'm inclined to fix up the low-hanging SSH stuff (at least #583, maybe look at the open PRs assigned to the SSH Agents milestone?) in the v0 branch for a v0.8 release.

I'll do separate PRs for these and keep them separate from the work on the standalone module.

@dahlbyk
Copy link
Owner Author

dahlbyk commented Jun 14, 2018

Where do we want to host the module? I'm happy to host it under my github account, or you can host it under yours. Let me know.

No preference. I can create a repo here, we can use a repo of your own, or we can see about hosting it under PoshCode.

Or, option 3: keep it in this repo, and just manage it better. @JeremySkinner glad to make you a maintainer here to that end.

@rkeithhill
Copy link
Collaborator

Another feature posh-ssh could provide is configuring Git to use Window's OpenSSH implementation via the env var GIT_SSH. That env var would need to be created at user or machine scope so that tools launched from the Start menu/taskbar would benefit. Then again, this might be something that Git for Windows supplies at some point?

@dahlbyk
Copy link
Owner Author

dahlbyk commented Jun 14, 2018

Or, option 3: keep it in this repo, and just manage it better.

I've already talked myself out of this. We'll want to tag posh-ssh versions separately from posh-git.

@JeremySkinner
Copy link
Collaborator

JeremySkinner commented Jun 14, 2018

Another feature posh-ssh could provide is configuring Git to use Window's OpenSSH implementation via the env var GIT_SSH.

Yes I think that's a good idea. We can always take it out in the future once git for windows supports it natively.

Do you think the env var is better than modifying the global .gitconfig?

Edit: I've just committed an initial attempt at win10 ssh support: #586

@rkeithhill
Copy link
Collaborator

rkeithhill commented Jun 14, 2018

Do you think the env var is better than modifying the global .gitconfig?

Good question. I wasn't aware of the .gitconfig setting for this until very recently. Seems like that probably would be a better way to go. OTOH a machine env var would set this for all users but on Windows, how often are there actually mulitple users? Plus setting env vars at the machine level is a pain because it doesn't take effect for all processes until you logout/in or restart. So I'd say, go with the .gitconfig approach.

@JeremySkinner
Copy link
Collaborator

Another thing I'd like to add is bookmark manager commands for manipulating the .ssh/config file (similar to how stormssh works). I have a couple of very messy scripts for doing this at the moment. Once the module is split out I'd like to tidy them up and bring them across.

@dahlbyk
Copy link
Owner Author

dahlbyk commented Jun 15, 2018

We can move it elsewhere if y'all want, but I've created https://github.com/dahlbyk/posh-ssh if you want to start creating issues there with a wishlist. Once we get v0 here in a good state, I'm thinking I'll just push this repo there and we can set about deleting all things posh-git. Unless you'd rather the repo not have posh-git baggage?

@JeremySkinner
Copy link
Collaborator

JeremySkinner commented Jun 15, 2018

Sounds good, thanks

@rkeithhill
Copy link
Collaborator

I'd call this issue resolved by the creation of posh-sshell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants