magit-status sees the repo just fine, and I can even push to Github, or make a branch. I can also commit through the git cli no problem.
However, before I can even write my commit message on magit I get the following error:
1 git … commit --
hint: Waiting for your editor to close the file...
Waiting for Emacs...
*ERROR*: Not inside Git repository
error: There was a problem with the editor '/usr/bin/emacsclient.emacs --socket-name=/run/user/1000/emacs/server39157'.
Please supply the message using either -m or -F option.
I read (with-editor)Configuring With-Editor on magit's manual, but I don't believe my installation of Emacs is abnormal. I installed it through the usual sudo apt install emacs
. Furthermore, both emacsclient and emacsclient.emacs are located on /usr/bin
. I tried customizing with-editor-emacsclient-executable
to just usr/bin/emacsclient
(no .emacs), to no avail.
There's a couple of lines to note in the output of with-editor-debug
. For brevity, I've added the entire output to this pastebin.
server-auth-dir: ~/.emacs.d/server/
WARNING: not an accessible directory
When I checked, the server sub-directory didn't exist. I tried creating it, but still, no success.
I'd be grateful if someone could give me directions on this. Committing through cli is getting tiresome 😅.
My installation's versions is:
Magit 20221008.1927 [>= 3.3.0-git], Git 2.34.1, Emacs 27.1, gnu/linux
Cheers!
emacsclient <somefile>
? How about a non-existent file, writing something into it and saving it? If those succeed, then it's probably a magit problem; otherwise it's an emacsclient one.magit-git.el
. In it, one of the four functions that raise the same error ismagit-inside-gitdir-p
. And sure enough, if I run the commented commandgit rev-parse --is-inside-git-dir
in the working directory, it returns false. I don't know yet what this means, but I'm starting to think there's a bad config somewhere.exec-path
is set to it's location.