git - push and pull attached to different remotes?

This isn't strictly a Linux question, but this list is a great knowledge base and I know a lot of you use git. Usually on Linux. :-) I've written a Python program that checks all of your repositories to see if they're up-to-date with your remotes. But given the flexibility of git - and the output of 'git remote show origin' which shows separate URLs for "Fetch" and "Push" - it's occurred to me that it's probably NOT safe to assume that the Fetch and Push URLs are the same. But ... does anyone actually have different Fetch and Push URLs? Why would you do this? -- Giles https://www.gilesorr.com/ gilesorr@gmail.com

On Mon, Jun 5, 2017 at 6:47 PM, Giles Orr via talk <talk@gtalug.org> wrote:
This isn't strictly a Linux question, but this list is a great knowledge base and I know a lot of you use git. Usually on Linux. :-)
I've written a Python program that checks all of your repositories to see if they're up-to-date with your remotes. But given the flexibility of git - and the output of 'git remote show origin' which shows separate URLs for "Fetch" and "Push" - it's occurred to me that it's probably NOT safe to assume that the Fetch and Push URLs are the same. But ... does anyone actually have different Fetch and Push URLs? Why would you do this?
I do. On some machines, I don't have ssh-agent setup because I can't set it up :-). In that case, my push is to ssh and my fetch is from git://. (I hope you all use passcodes with your ssh keys :-) ) Dhaval

On 05/06/17 06:49 PM, Dhaval Giani via talk wrote:
On Mon, Jun 5, 2017 at 6:47 PM, Giles Orr via talk <talk@gtalug.org <mailto:talk@gtalug.org>> wrote:
This isn't strictly a Linux question, but this list is a great knowledge base and I know a lot of you use git. Usually on Linux. :-)
I've written a Python program that checks all of your repositories to see if they're up-to-date with your remotes. But given the flexibility of git - and the output of 'git remote show origin' which shows separate URLs for "Fetch" and "Push" - it's occurred to me that it's probably NOT safe to assume that the Fetch and Push URLs are the same. But ... does anyone actually have different Fetch and Push URLs? Why would you do this?
I do. On some machines, I don't have ssh-agent setup because I can't set it up :-). In that case, my push is to ssh and my fetch is from git://. (I hope you all use passcodes with your ssh keys :-) )
Dhaval
I too have separate push and pull pointers on some repos, as they push to upstream from my dev repo. The latter is often broken, as it saves stuff from work and home, and gets pulled into the oddball repo to get regression-tested, on it's way upstream. It makes perfect sense to say "the regression-test repo of X is two commits ahead of its source and up to date with its upstream", and it'suseful. --dave -- David Collier-Brown, | Always do right. This will gratify System Programmer and Author | some people and astonish the rest davecb@spamcop.net | -- Mark Twain
participants (3)
-
David Collier-Brown
-
Dhaval Giani
-
Giles Orr