How can I set up Magit to access a GitHub repository?

  • 1
    What aspect of "accessing a Github repository" didn't work? What have you tried?
    – tarsius
    Commented Mar 30, 2017 at 10:16
  • @tarsius: I have not tried anything yet except for reading the Introduction, Installation, Post Installation, and Getting Started sections of the Magit manual. I couldn't find any explanation on how to access a GitHub repository. I don't want to install this package before I know whether it's possible to access a GitHub repository. By "accessing a GitHub repository" I mean creating a branch, downloading the latest version of a file, committing a file, reviewing diffs, merging, etc.
    – Evan Aad
    Commented Mar 30, 2017 at 10:29
  • 1
    magit can do anything command line git can.
    – JeanPierre
    Commented Mar 30, 2017 at 13:22
  • First, learn how magit basics to clone and "access" the github repository. Then, you'll find more github tools here, including magithub that extends magit to fetch issues, pull requests, etc.
    – Ehvince
    Commented Mar 31, 2017 at 10:16

2 Answers 2


Generally speaking you don't configure Magit to access a remote Git repository. Instead you configure git and because Magit uses git, Magit is then also able to do so.

Some issues can arise due to misconfiguration and/or Windows not having a concept of a pty. But even then, the solution is to properly configure Git and/or Emacs. No additional Magit configuration is required. (Except if you use some two-factor authentication, then you might have to adjust magit-process-password-prompt-regexps).

Some of the difficulties that might arise, are covered in this wiki page.

  • Thanks. But my question remains, if in a slightly different formulation: What steps do I need to take, after installing Magit, in order that Magit will work vis-a-vis a given GitHub repository?
    – Evan Aad
    Commented Mar 30, 2017 at 10:54
  • 1
    Assuming that you are already able to "access Github" when using git on the command line, there is a 99% chance that the answer is "none". If you are using Windows, then the probability only is 95%. The 4% difference is due to you possibly having to do "setx HOME C:/path/to/home". I cannot help you any further until you have actually tried. Once you have tried and have run into a problem, I or someone else will help you though.
    – tarsius
    Commented Mar 30, 2017 at 11:05
  1. Use magit-clone to clone a GitHub (or any Git) repo
    • You can also clone via command line, of course, which I prefer
  2. Open a file in the repo and call magit-status
    • It is convenient to bind this to a key, e.g. C-c m

Congratulations, you're using Magit.

Howard Abrams' excellent introductory video can get you started with staging, committing, pushing, etc. A comprehensive user manual is also available.

I don't want to install this package before I know whether it's possible to access a GitHub repository.

Uhh...where's the spirit of experimentation?

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.