Is it possible to set a default username (i.e.: my Github user name) for magit? It is prompting for the user every time I have to push a commit.

Don't know if this may help with the answer, but I already have my username and my e-mail in ~/.gitconfig as per magit's manual:

The default is determined by the user.name and user.email git configuration settings.


user.name in your .gitconfig is only for authorship of commits, and not used for authentication. It seems you are using password authentication before pushing to github.

| improve this answer | |
  • 2
    Thank you, that was it. Fixed it with: git remote set-url origin git@github.com:username/repo.git – Boccaperta-IT Sep 30 '14 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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