When pull from magit on windows 10 (spacemacs), the error is:

  1 C:/Program Files/Git/mingw64/libexec/git-core/git … pull origin

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

But if pull from command line it works. Is there any setting in magit to fix it?

C:\code\python\db-in-box>"C:/Program Files/Git/mingw64/libexec/git-core/git" --version
git version 2.11.0.windows.1
  • Most likely this is related to authentication: how do you authenticate in your Git repository? Do you use password / keys? Did you clone repository using https:// or git:// URL?
    – wvxvw
    Jan 13, 2017 at 9:19
  • I am using ssh, not https. I have configured the ssh key.
    – Daniel Wu
    Jan 16, 2017 at 2:50

1 Answer 1


There's a number of things that could be wrong, for example Emacs and Windows might not agree on where $HOME is. Or maybe you are trying to use password authentication, which does not work on Windows. But it's hard to tell because you don't provide much information.

There's a whole wiki page dedicated to, well, pushing on Windows. But if pushing works, then pulling works too. Check it out: Pushing with Magit from Windows.

Linking to the documentation usually isn't an acceptable approach to answering a question on Stackexchange, but here I feel it is appropriate. But once you figured out what the issue in your particular case was, you are of course free to provide your own answer here, and maybe even adjust your question accordingly.

  • 1
    After set the HOME, it works.
    – Daniel Wu
    Jan 16, 2017 at 4:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.