1

Linux Mint Emacs 25.1

Remote repo URL

origin (h t t p://git.remotehostname.git)

In application SmartGit when I pull/push data from remote repo, it's prompt credentials ONLY ONCE.

But when I try pull data by Magit - it's prompt credentials EVERY TIME when I use magit-pull or magit-push.

How I can save credentials in Magit?

1

How I can save credentials in Magit?

The best way to do that is to not do it and instead configure git itself. That way it works on the command-line and in Magit.

There are two problems with that approach:

  • You have to learn how to configure this aspect of git and there are many different options available. On the other hand because many more people use git than Magit, it should be easier to search for relevant documentation and tutorials.

  • Depending on how you configure git, these configurations may not carry over to Magit. Typically this happens when a user configures git in their shell startup file, but then start Emacs by clicking on a symbol. In that case emacs isn't a child process of, say, bash and so it does not inherit its environment variables.

Magit actually can remember your password for you and I just improved that functionality a few minutes ago (so make sure to update before trying this out). See the doc-string of magit-process-password-auth-source, it should have you covered.

| improve this answer | |

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.