phtrivier <[email protected]> writes:

> Hi, i am using magit to interface with a github repository, for which
> I configured my ssh key.
>
> When I want to git push to it, I normally have to enter my ssh key
> passphrase. However when pushing from magit, I don't get prompted for
> my passphrase.
>
> I tried displaying the git output (using '$'), and it shows the
> prompt, but the buffer is read-only and I cannot edit it (I also tried
> toggling the read-only property, with no success).
>
> Is it possible to have magit ask for the ssh passphrase in emacs
> minibuffer ?

It's a bug: we don't tell ssh that it can't ask for passphrase there.

You will found there :
http://gitorious.org/~__DL__/magit/remi-magit-clone/commits/ssh-asking
a patched version that do it better. This need testing (I have change
the way magit run git, and I believe that it won't change anything, but
testing will prove it).

It would be probably better to detect the passphrase asking, and to use
Emacs to ask for it, but this is a more complicated fix. If someone
could do it, it would be great.

Here is the fixing commit:

commit 213bd29c793b2904b29a01a9c8448e4f9b4c4823
Author: Rémi Vanicat <[email protected]>
Date:   Tue Dec 15 07:42:57 2009 +0100

    Use pipe rather than tty for connection with git.
    
    When remote updating, git may use ssh that may ask for a password or
    passphrase. ssh used to be on a tty, and so believe that it could ask
    the passphrase directly to the user. It now know that it can't, and
    will ssh-askpass (if available) to do the asking.
    
    It would be probably better to detect the passphrase asking, and to
    use Emacs to ask for it.

diff --git a/magit.el b/magit.el
index bfbfe9b..a035ebe 100644
--- a/magit.el
+++ b/magit.el
@@ -1004,7 +1004,8 @@ Many Magit faces inherit from this one by default."
        (args (cdr cmd-and-args))
        (dir default-directory)
        (buf (get-buffer-create "*magit-process*"))
-       (successp nil))
+       (successp nil)
+       (process-connection-type nil))
     (magit-set-mode-line-process
      (magit-process-indicator-from-command cmd-and-args))
     (setq magit-process-client-buffer (current-buffer))



-- 
Rémi Vanicat

Reply via email to