Make magit ask for password also when git is asking for an host password
Previously we were asking only when there was a passphrase for ssh key.
This commit is contained in:
parent
3d1faa122e
commit
c256a726d4
1 changed files with 2 additions and 3 deletions
5
magit.el
5
magit.el
|
@ -1289,14 +1289,13 @@ FUNC should leave point at the end of the modified region"
|
||||||
|
|
||||||
(defun magit-password (proc string)
|
(defun magit-password (proc string)
|
||||||
"Checks if git/ssh asks for a password and ask the user for it."
|
"Checks if git/ssh asks for a password and ask the user for it."
|
||||||
(when (string-match "^Enter passphrase for key '\\\(.*\\\)': $" string)
|
(when (or (string-match "^Enter passphrase for key '\\\(.*\\\)': $" string)
|
||||||
|
(string-match "^\\\(.*\\\)'s password:" string))
|
||||||
(process-send-string proc
|
(process-send-string proc
|
||||||
(concat (read-passwd
|
(concat (read-passwd
|
||||||
(format "Password for '%s': " (match-string 1 string))
|
(format "Password for '%s': " (match-string 1 string))
|
||||||
nil) "\n"))))
|
nil) "\n"))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defun magit-process-filter (proc string)
|
(defun magit-process-filter (proc string)
|
||||||
(save-current-buffer
|
(save-current-buffer
|
||||||
(set-buffer (process-buffer proc))
|
(set-buffer (process-buffer proc))
|
||||||
|
|
Loading…
Reference in a new issue