Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passphrase prompt #41

Open
nicodebo opened this issue Jan 1, 2022 · 2 comments
Open

passphrase prompt #41

nicodebo opened this issue Jan 1, 2022 · 2 comments

Comments

@nicodebo
Copy link

nicodebo commented Jan 1, 2022

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.

@ryuslash
Copy link
Owner

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.

@nicodebo
Copy link
Author

nicodebo commented Feb 20, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants