On Thu, 14 Feb 2013 10:17:46 +0100 Rémi Vanicat <[email protected]> wrote:
RV> Julien Cubizolles <[email protected]> writes: >> I'm a new (and happy) user of magit. I've tried to add login/password to >> my .authinfo file to save typing it at each git operation but couldn't >> figure out the right syntax. >> Here is what I tried. >> machine github.com protocol https login *mylogin* password >> *mypassword* RV> We didn't yet wrote the code needed for magit to use standard Emacs RV> authentication, so there is nothing you can do, but wrote the code RV> yourself, or wait for some good man to do it. RV> I use ssh and ssh-agent for this, so I've to enter only once a RV> passphrase for all my git activities (on github and elsewhere) Hello Julien and Rémi, the Git credential helper protocol is good enough to handle this. On the git developer mailing list I have proposed a netrc credential helper that will look up login name and password from a .authinfo/.netrc file (using GPG if it has the .gpg suffix). It's OK mostly, except I still have to write tests for it, so I'd expect it to make it into an upcoming Git release, and it's in contrib/ so it can be pulled out for standalone use. Julien, if you're interested, you can look at the patch and test it out for yourself. Practically, the application of the netrc credential helper is that all the wrappings of Emacs' auth-source.el will not be needed. Git itself respects the GIT_CONFIG environment variable, so Magit could pass a special gitconfig file with the netrc credential helper specified, but I think it's better to make the user handle it and document it. Either way, Git will consult the netrc credential helper, which takes the problem off Magit's hands. I think that's the right approach with Git because it's an external tool. The best part of this solution is that the netrc credential helper is just one of many. The user could choose to use the GNOME Keyring, the Secrets API, or the Mac OS X keychain through the appropriate credential helper. Magit and Emacs don't have to care. Ted -- --- You received this message because you are subscribed to the Google Groups "magit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
