Compare commits
1 Commits
53a9ede65c
...
bbb75c7b46
| Author | SHA1 | Date | |
|---|---|---|---|
| bbb75c7b46 |
@ -844,9 +844,13 @@ for KEY-FILE; PASSWORD-FN is called on demand.
|
||||
|
||||
This function uses ssh-add to add the key to the currently
|
||||
running ssh-agent and waits for the process to finish."
|
||||
(let ((key-file (expand-file-name key-file)))
|
||||
|
||||
(unless (file-readable-p key-file)
|
||||
(user-error "SSH key %s does not exist, aborting" key-file))
|
||||
|
||||
(with-environment-variables (("SSH_ASKPASS_REQUIRE" "never"))
|
||||
(let* ((key-file (expand-file-name key-file))
|
||||
(proc (make-process :name "ssh-add"
|
||||
(let ((proc (make-process :name "ssh-add"
|
||||
:buffer nil
|
||||
:command (list "ssh-add" key-file)
|
||||
:filter #'(lambda (process output)
|
||||
@ -875,7 +879,7 @@ running ssh-agent and waits for the process to finish."
|
||||
;; intermingle with others. XXX: is there a more standard way to wait for
|
||||
;; a process to finish?
|
||||
(while (process-live-p proc)
|
||||
(sit-for 0.2)))))
|
||||
(sit-for 0.2))))))
|
||||
|
||||
(defun db/ssh-key-hash-from-filename (key-file)
|
||||
"Return the SHA256 hash value of the SSH key located in KEY-FILE.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user