For some repositories at work I get the following message when I try to push my commits:
GitError! Could not read from remote repository. [Type `$' for details]
The details read:
128 C:/Program Files/Git/mingw64/libexec/git-core/git.exe … "push" "-v" "origin" "master:refs/heads/master"
Pushing to ssh://[email protected]
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Any idea what the problem could be? Running the above git command from a git-bash (minus those tripple-dots) also works. In fact, that's my workaround. Compose the commit with magit and just type git push in a git-bash. Pushing to github.com repository on the same machine works from magit.
TAB
on the128...
line to actually see the details.ssh://...
, you must be using SSH keys to authenticate against the repository. I'd start by making sure thatgit-bash
expands$HOME
to the same directory asM-x getenv HOME
. Or, perhaps, you are running anssh-agent
program that manages the keys for you, but it runs in thegit-bash
session, and not in Emacs (so you would need to startssh-agent
in Emacs too).