Giter VIP home page Giter VIP logo

Comments (9)

davvid avatar davvid commented on May 26, 2024

I see. Is there a graphical ssh-agent that can be used?

I'll have to try this out myself.. I was always vaguely aware that there were some things that probably weren't handled right, such as ssh logins with passwords.

Any hint as to how we might be able to fix this?

from git-cola.

mathstuf avatar mathstuf commented on May 26, 2024

Yes. There's some env variable for SSH GUI passkeys. Using that should be fine. How to get one when there isn't the env var would probably be a list of defaults. I'd say use tools according to the toolkit they use (to keep dependency hell at bay):

Qt -> KDE -> GTK/GNOME -> Windows

If none is found, popping up a window in git-cola is better than hanging on stdin. Maybe a timeout could work as well with a dialog popup if the password failed.

from git-cola.

davvid avatar davvid commented on May 26, 2024

Have you tried using an ssh-agent?
I think that might be the right solution.

http://mah.everybody.org/docs/ssh

cola knows nothing and should continue to know nothing about KDE, GNOME, OSX, or Windows.

I'm currently implementing a tags interface and when I asked the requestor about the password prompt when signing tags, he mentioned gpg-agent being the way it's done. i.e. there's nothing for cola to do -- it's handled externally.

I'm pretty sure ssh-agent is the right answer for this one too.

from git-cola.

davvid avatar davvid commented on May 26, 2024

There's no way for cola to know whether or not a push will require an ssh-agent or not, so this cannot be solved in general. Some ssh URLs need an agent, some don't.

There's no way for cola to tell them apart, and we can't force an ssh-agent upon a user if they don't need it.

from git-cola.

mathstuf avatar mathstuf commented on May 26, 2024

The problem is that I usually forget to ssh-add for a session (whose restarts are far and few between) until I'm asked for a passphrase. git-cola hangs while it is doing this (possibly even if a ssh password is needed) and if it is the first thing I am using SSH for in that session, I have to kill git-cola, ssh-add things, then restart git-cola.

from git-cola.

davvid avatar davvid commented on May 26, 2024

Let me know if this is helpful at all:
http://lists.zerezo.com/git/msg639684.html

It seems like setting $DISPLAY, backgrounding cola, and closing the terminal should be enough to get ssh-askpass to prompt you.

I apologize for not being able to test this a.t.m., so I'll need your help to verify that we can find a good solution.

from git-cola.

davvid avatar davvid commented on May 26, 2024

Hmmm.. from reading through git-gui it seems like they have their own SSH_ASKPASS implementation that they use as a fallback.

It might be worth using it here too. I'm going to re-open this issue and mark it as a feature request. If SSH_ASKPASS is not set, then we should use our own.

from git-cola.

davvid avatar davvid commented on May 26, 2024

Here's the reference implementation.
From what I can tell, we can do the same in cola and it should fix this for ya.

Can you verify whether this is the case?
http://groups.google.com/group/msysgit/msg/ff3c513000bc82c6

Try doing this:

$ SSH_ASKPASS=/usr/libexec/git-core/git-gui--askpass

$ export SSH_ASKPASS

$ bin/git-cola

If that does the right thing (prompt you for your password) then the fix I'm working on will work. I'm basically going to set SSH_ASKPASS if it's empty.

Let me know if that seems like the way to go.

Of course I won't hard-code /usr/lib/... in cola. I'll have to ship my own copy of the ssh-askpass script.

Thanks for the help.

from git-cola.

davvid avatar davvid commented on May 26, 2024

Add an ssh-askpass implementation

cola locks up when remote operations are attempted
on SSH URLs that require a password and no TTY is
available.

To fix this we now provide our own SSH_ASKPASS
implementation as a fallback.

Closed by 47b1741

Signed-off-by: David Aguilar [email protected]

from git-cola.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.