Hi,
I just wrote a quick fix for it. That asks for the password. It needs
some testing and magit-password should check if the Enter thing is
really the second line after the "$ git" line.
If you don't want to apply this highly experimental patch and find
yourself in a situation where magit "hangs" because a process is
running. Switch to the process buffer ($) and kill it (C-x k) and
confirm with yes. This should help.
Regards,
Rüdiger <
rued...@c-plusplus.de>
P.S. magit is really great. I love using it!
Changes in HEAD
Modified magit.el
diff --git a/magit.el b/magit.el
index bfbfe9b..7c694f5 100644
--- a/magit.el
+++ b/magit.el
@@ -1074,10 +1074,20 @@ Many Magit faces inherit from this one by
default."
(magit-set-mode-line-process nil)
(magit-refresh-buffer magit-process-client-buffer)))
+(defun magit-password (proc string)
+ "Checks if git/ssh asks for a password and ask the user for it."
+ (when (string-match "^Enter passphrase for key '\\\(.*\\\)': $"
string)
+ (process-send-string proc
+ (concat (read-passwd
+ (format "Password for '%s':
" (match-string 1 string))
+ nil) "\n"))))
+
(defun magit-process-filter (proc string)
(save-current-buffer
(set-buffer (process-buffer proc))
(let ((inhibit-read-only t))
+ (magit-password proc string)
(goto-char (process-mark proc))
;; Find last ^M in string. If one was found, ignore everything
;; before it and delete the current line.
On Dec 15, 8:01 am,
vani...@debian.org (Rémi Vanicat) wrote:
> phtrivier <
phtriv...@gmail.com> 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 <
vani...@debian.org>