{"thread":{"id":"31006","subject":"How can I append authentication with \"git push\" ?","startedAt":"2012-07-12T08:18:44Z","lastAt":"2012-07-16T11:11:05Z","messageCount":7,"participants":["J. Bakshi","Jeff King","Thiago Farina","Nick Douma","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"194955","messageId":"20120712134844.2d1c4378@shiva.selfip.org","threadId":"31006","inReplyTo":null,"subject":"How can I append authentication with \"git push\" ?","fromName":"J. Bakshi","fromEmail":"joydeep.bakshi@infoservices.in","sentAt":"2012-07-12T08:18:44Z","receivedAt":"2012-07-12T08:18:44Z","isPatch":false,"sender":{"key":"joydeep.bakshi@infoservices.in","avatar":null},"body":"\nDear list,\n\nIs there any option to add user-name and password with git push ?\nOr any repo wise configuration file where I can save the info, so that\nit doesn't ask the credential before every push ?\n\nThanks\n"},{"id":"194958","messageId":"20120712094040.GA5268@sigill.intra.peff.net","threadId":"31006","inReplyTo":"20120712134844.2d1c4378@shiva.selfip.org","subject":"Re: How can I append authentication with \"git push\" ?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-07-12T09:40:40Z","receivedAt":"2012-07-12T09:40:40Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jul 12, 2012 at 01:48:44PM +0530, J. Bakshi wrote:\n\n> Is there any option to add user-name and password with git push ?\n\nThe username can go in the URL. For example:\n\n  git push user@host:repo.git\n\nfor ssh, or:\n\n  git push https://user@host/repo.git\n\nfor http.\n\nFor ssh, you can't specify a password automatically, but you should look\ninto using key authentication (which can then be cached by ssh-agent).\nFor http, you can put the password in the URL, but there are some\nsecurity implications (like the fact that your password will be\ncleartext on disk, and visible in the process list to other users on the\nsystem).\n\nWhat protocol are you using to push?\n\n> Or any repo wise configuration file where I can save the info, so that\n> it doesn't ask the credential before every push ?\n\nOlder versions of git can read from .netrc, but I would not recommend\nthat, as it involves storing the password in plaintext on disk.\n\nNewer versions of git (v1.7.9 and up) support \"credential helpers\" which\nwill read from a password wallet or other secure storage provided by the\nOS. There is a helper for OS X Keychain in contrib/, and somebody has\nbeen working on one for Windows.  What platform are you using?\n\n-Peff\n"},{"id":"194965","messageId":"CACnwZYfbbZJV--aaOVH+af+Hxibg7XWvb909kZYWgKXVHexfDw@mail.gmail.com","threadId":"31006","inReplyTo":"20120712134844.2d1c4378@shiva.selfip.org","subject":"Re: How can I append authentication with \"git push\" ?","fromName":"Thiago Farina","fromEmail":"tfransosi@gmail.com","sentAt":"2012-07-12T15:04:27Z","receivedAt":"2012-07-12T15:04:27Z","isPatch":false,"sender":{"key":"tfransosi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/970071?v=4"},"body":"On Thu, Jul 12, 2012 at 5:18 AM, J. Bakshi\n<joydeep.bakshi@infoservices.in> wrote:\n> Or any repo wise configuration file where I can save the info, so that\n> it doesn't ask the credential before every push ?\n>\nI'd like to know how to do that too.\n\nIt's a pain to have to type username and password every time I need to\npush to github. (Linux here btw).\n"},{"id":"194966","messageId":"4FFEEDB3.5060003@nekoconeko.nl","threadId":"31006","inReplyTo":"CACnwZYfbbZJV--aaOVH+af+Hxibg7XWvb909kZYWgKXVHexfDw@mail.gmail.com","subject":"Re: How can I append authentication with \"git push\" ?","fromName":"Nick Douma","fromEmail":"n.douma@nekoconeko.nl","sentAt":"2012-07-12T15:30:59Z","receivedAt":"2012-07-12T15:30:59Z","isPatch":false,"sender":{"key":"n.douma@nekoconeko.nl","avatar":"https://gravatar.com/avatar/93ce45c81df3adf49c9d5ee27c2e27bcc519ea6b43ad60e31e070119ff2abd92?d=mp&s=160"},"body":"Hi,\n\nOn 12-07-12 17:04, Thiago Farina wrote:\n> On Thu, Jul 12, 2012 at 5:18 AM, J. Bakshi\n> <joydeep.bakshi@infoservices.in> wrote:\n>> Or any repo wise configuration file where I can save the info, so that\n>> it doesn't ask the credential before every push ?\n>>\n> I'd like to know how to do that too.\n> \n> It's a pain to have to type username and password every time I need to\n> push to github. (Linux here btw).\n\nIf you're specifically looking at GitHub and HTTP auth, take a look at\nthe hub tool:\n\nhttps://github.com/defunkt/hub\n\nKind regards,\n\nNick Douma\n\n"},{"id":"194972","messageId":"7vpq80c2t1.fsf@alter.siamese.dyndns.org","threadId":"31006","inReplyTo":"CACnwZYfbbZJV--aaOVH+af+Hxibg7XWvb909kZYWgKXVHexfDw@mail.gmail.com","subject":"Re: How can I append authentication with \"git push\" ?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-12T17:22:18Z","receivedAt":"2012-07-12T17:22:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thiago Farina <tfransosi@gmail.com> writes:\n\n> On Thu, Jul 12, 2012 at 5:18 AM, J. Bakshi\n> <joydeep.bakshi@infoservices.in> wrote:\n>> Or any repo wise configuration file where I can save the info, so that\n>> it doesn't ask the credential before every push ?\n>>\n> I'd like to know how to do that too.\n>\n> It's a pain to have to type username and password every time I need to\n> push to github. (Linux here btw).\n\nI never type either when pushing to github, and I've been pushing\nthere at least twice a day for quite some time (Linux here btw).\n\nI have these in .git/config:\n\n        [remote \"github2\"]\n                url = https://github.com/git/git\n                fetch = +refs/heads/*:refs/remotes/github2/*\n                pushurl = github.com:git/git.git\n                push = refs/heads/maint:refs/heads/maint\n                push = refs/heads/master:refs/heads/master\n                push = refs/heads/next:refs/heads/next\n                push = +refs/heads/pu:refs/heads/pu\n\n        [remote \"github\"]\n                url = https://github.com/gitster/git\n                pushurl = github.com:gitster/git.git\n                mirror\n\nand then this in $HOME/.ssh/config:\n\n        Host github.com\n                User git\n                IdentityFile ~/.ssh/github\n"},{"id":"195098","messageId":"20120716135512.1a3ce06c@shiva.selfip.org","threadId":"31006","inReplyTo":"20120712134844.2d1c4378@shiva.selfip.org","subject":"Re: How can I append authentication with \"git push\" ?","fromName":"J. Bakshi","fromEmail":"joydeep.bakshi@infoservices.in","sentAt":"2012-07-16T08:25:12Z","receivedAt":"2012-07-16T08:25:12Z","isPatch":false,"sender":{"key":"joydeep.bakshi@infoservices.in","avatar":null},"body":"\nAny idea please ?\n\nOn Thu, 12 Jul 2012 13:48:44 +0530\n\"J. Bakshi\" <joydeep.bakshi@infoservices.in> wrote:\n\n> \n> Dear list,\n> \n> Is there any option to add user-name and password with git push ?\n> Or any repo wise configuration file where I can save the info, so that\n> it doesn't ask the credential before every push ?\n> \n> Thanks\n"},{"id":"195102","messageId":"20120716111105.GA4962@sigill.intra.peff.net","threadId":"31006","inReplyTo":"20120716135512.1a3ce06c@shiva.selfip.org","subject":"Re: How can I append authentication with \"git push\" ?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-07-16T11:11:05Z","receivedAt":"2012-07-16T11:11:05Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jul 16, 2012 at 01:55:12PM +0530, J. Bakshi wrote:\n\n> Any idea please ?\n\nDid you miss the four responses here:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/201351\n\n?\n\n-Peff\n"}]}