Function: magit-process-password-prompt

magit-process-password-prompt is a byte-compiled function defined in magit-process.el.

Signature

(magit-process-password-prompt PROCESS STRING)

Documentation

Find a password based on prompt STRING and send it to git.

Use magit-process-password-prompt-regexps to find a known prompt. If and only if one is found, then call functions in magit-process-find-password-functions until one of them returns the password. If all functions return nil, then read the password from the user.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-process.el
(defun magit-process-password-prompt (process string)
  "Find a password based on prompt STRING and send it to git.
Use `magit-process-password-prompt-regexps' to find a known
prompt.  If and only if one is found, then call functions in
`magit-process-find-password-functions' until one of them returns
the password.  If all functions return nil, then read the password
from the user."
  (when-let ((prompt (magit-process-match-prompt
                      magit-process-password-prompt-regexps string)))
    (process-send-string
     process
     (concat (or (and$ (match-str 99 string)
                       (run-hook-with-args-until-success
                        'magit-process-find-password-functions $))
                 (let ((read-passwd-map
                        (magit-process-make-keymap process read-passwd-map)))
                   (read-passwd prompt)))
             "\n"))))