git-auto-commit-mode icon indicating copy to clipboard operation
git-auto-commit-mode copied to clipboard

passphrase prompt

Open nicodebo opened this issue 4 years ago • 2 comments

Hello, Thank you for this useful package.

I have set up git-auto-commit-mode with a dir-locals.el. When I save a file, the auto-commit works fine. However the push fails. Here is the content of the Messages buffer:

[master 48d4fa1] anniversaire.org
 1 file changed, 2 deletions(-)
git exited abnormally with code 128

my remote repository looks like ssh://git… When I push with magit, it prompts for the passphrase within the mini buffer but it seems to fail with git-auto-commit-mode. Is git-auto-commit-mode supposed to ask me for the passphrase of the key ?

Edit: my bad. The upstream was not set. I did the following in my repo: git push --set-upstream origin master Now when I save, the error does not appear anymore in the Messages buffer, but It still does not push nor asks for a passphrase.

nicodebo avatar Jan 01 '22 20:01 nicodebo

Hey! :)

Glad to hear it's useful to you. Thanks for reporting this issue!

If gac-automatically-push-p is non-nil it should be trying to push and asking for a password. When you run git from the command-line, what is the actual prompt for your password? This package searches specifically for one of the phrases:

  • Enter passpharse for key 'KEYNAME': where KEYNAME is the file location of the key.
  • SOMEONE's password: where SOMEONE is a user name.
  • Password: or password: It expects any of these to show up at the very start of a line.

Is there any difference in what you see perhaps? There might be some output in the *git-auto-push* buffer, I'm not 100% sure.

ryuslash avatar Jan 24 '22 05:01 ryuslash

Hello, Thank you for your support and I apologies for the delay.

init.el:

(use-package git-auto-commit-mode)

.dir-locals.el

;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")

((nil . ((eval . (git-auto-commit-mode 1))))
 (org-mode . ((gac-automatically-add-new-files-p . nil)
	      (gac-automatically-push-p . t))))

C-h v gac-automatically-push-p shows me:

gac-automatically-push-p is a buffer-local variable defined in
git-auto-commit-mode.el.

Value in #<buffer perso.org>
t

upstream setting

$ git name-rev @{u}
@{u} remotes/origin/master

git-auto-push buffer

It's empty. I don't see any output. The only output I see is on the minibuffer when saving a file.

passphrase prompt

If I do git push on the terminal I get asked: Enter passphrase for key … : If I do magit-push from emacs I get Enter passphrase for key … : on the minibuffer.

when quitting emacs

It prompt me with this active process list:

git             638259  run     *git-auto-push*           /dev/pts/2   Main         git push
git<1>          648635  run     *git-auto-push*           /dev/pts/3   Main         git push
git<2>          648997  run     *git-auto-push*           /dev/pts/4   Main         git push
git<3>          661507  run     *git-auto-push*           /dev/pts/5   Main         git push
git<4>          662011  run     *git-auto-push*           /dev/pts/6   Main         git push

nicodebo avatar Feb 20 '22 13:02 nicodebo