{"thread":{"id":"22833","subject":"Different Fetch and Push URLs?","startedAt":"2010-02-26T15:01:40Z","lastAt":"2010-02-26T15:32:30Z","messageCount":4,"participants":["Tim Visher","Jeff King","Tomas Carnecky"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"135756","messageId":"c115fd3c1002260701u11cf506fq747d7217d31eba59@mail.gmail.com","threadId":"22833","inReplyTo":null,"subject":"Different Fetch and Push URLs?","fromName":"Tim Visher","fromEmail":"tim.visher@gmail.com","sentAt":"2010-02-26T15:01:40Z","receivedAt":"2010-02-26T15:01:40Z","isPatch":false,"sender":{"key":"tim.visher@gmail.com","avatar":"https://gravatar.com/avatar/98307ce54bcac1a46b5d845827d5386e2a27895ff08790cdd3877ad527760575?d=mp&s=160"},"body":"Hello Everyone,\n\nMy work situation leaves me in a situation where I can clone from my\ncentral repo but I can't push there.  Is it possible and does it make\nany sense to have a single remote with one URL that I pull from and\nanother than I push to?  I only ask because I was looking at the\noutput of `git remote show` and noticed that there are 2 URLs.  If it\nis possible, how do I do it?  I looked in `.git/config` and there's\nonly 1 URL there.\n\nI am aware that I could have 2 remotes and simply consciously remember\nto only push to the one that I have access to.  This is what I usually\ndo but the scenario I describe above seems nicer to me.\n\nThanks!\n\n-- \n\nIn Christ,\n\nTimmy V.\n\nhttp://burningones.com/\nhttp://five.sentenc.es/ - Spend less time on e-mail\n"},{"id":"135760","messageId":"4B87E660.7010401@dbservice.com","threadId":"22833","inReplyTo":"c115fd3c1002260701u11cf506fq747d7217d31eba59@mail.gmail.com","subject":"Re: Different Fetch and Push URLs?","fromName":"Tomas Carnecky","fromEmail":"tom@dbservice.com","sentAt":"2010-02-26T15:18:56Z","receivedAt":"2010-02-26T15:18:56Z","isPatch":false,"sender":{"key":"tom@dbservice.com","avatar":"https://gravatar.com/avatar/900a300bdd1a8bbe086008ad78210bbee2ad2803b7d50a5cba04c1e9404bd6d2?d=mp&s=160"},"body":"On 2/26/10 4:01 PM, Tim Visher wrote:\n> Hello Everyone,\n>\n> My work situation leaves me in a situation where I can clone from my\n> central repo but I can't push there.  Is it possible and does it make\n> any sense to have a single remote with one URL that I pull from and\n> another than I push to?  I only ask because I was looking at the\n> output of `git remote show` and noticed that there are 2 URLs.  If it\n> is possible, how do I do it?  I looked in `.git/config` and there's\n> only 1 URL there.\n>\n> I am aware that I could have 2 remotes and simply consciously remember\n> to only push to the one that I have access to.  This is what I usually\n> do but the scenario I describe above seems nicer to me.\n\ngit config remote.origin.pushurl <your push url>\n\n(see the git-config(1) man page for more details)\n\ntom\n"},{"id":"135757","messageId":"20100226152043.GA26963@coredump.intra.peff.net","threadId":"22833","inReplyTo":"c115fd3c1002260701u11cf506fq747d7217d31eba59@mail.gmail.com","subject":"Re: Different Fetch and Push URLs?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-02-26T15:20:43Z","receivedAt":"2010-02-26T15:20:43Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Feb 26, 2010 at 10:01:40AM -0500, Tim Visher wrote:\n\n> My work situation leaves me in a situation where I can clone from my\n> central repo but I can't push there.  Is it possible and does it make\n> any sense to have a single remote with one URL that I pull from and\n> another than I push to?  I only ask because I was looking at the\n> output of `git remote show` and noticed that there are 2 URLs.  If it\n> is possible, how do I do it?  I looked in `.git/config` and there's\n> only 1 URL there.\n\nTry \"remote.*.pushurl\". It's in git-config(1) and in git-push(1) under\n\"Named remote in configuration file\".\n\n-Peff\n"},{"id":"135759","messageId":"c115fd3c1002260732x79f44d8ft6bff9d9b4f226402@mail.gmail.com","threadId":"22833","inReplyTo":"20100226152043.GA26963@coredump.intra.peff.net","subject":"Re: Different Fetch and Push URLs?","fromName":"Tim Visher","fromEmail":"tim.visher@gmail.com","sentAt":"2010-02-26T15:32:30Z","receivedAt":"2010-02-26T15:32:30Z","isPatch":false,"sender":{"key":"tim.visher@gmail.com","avatar":"https://gravatar.com/avatar/98307ce54bcac1a46b5d845827d5386e2a27895ff08790cdd3877ad527760575?d=mp&s=160"},"body":"On Fri, Feb 26, 2010 at 10:20 AM, Jeff King <peff@peff.net> wrote:\n> On Fri, Feb 26, 2010 at 10:01:40AM -0500, Tim Visher wrote:\n>\n>> My work situation leaves me in a situation where I can clone from my\n>> central repo but I can't push there.  Is it possible and does it make\n>> any sense to have a single remote with one URL that I pull from and\n>> another than I push to?  I only ask because I was looking at the\n>> output of `git remote show` and noticed that there are 2 URLs.  If it\n>> is possible, how do I do it?  I looked in `.git/config` and there's\n>> only 1 URL there.\n>\n> Try \"remote.*.pushurl\". It's in git-config(1) and in git-push(1) under\n> \"Named remote in configuration file\".\n\nThanks, both of you.  That worked like a charm.\n\n-- \n\nIn Christ,\n\nTimmy V.\n\nhttp://burningones.com/\nhttp://five.sentenc.es/ - Spend less time on e-mail\n"}]}