I have a git bare repository as a remote on a server with 2 network interfaces, whose IP address are 192.168.x.x and 223.x.x.x respectively. I have a signle git project on this single remote origin. Inside the lab this remote can only be accessed via 192.168.x.x (CISCO hairpin disabled), and vice versa (which of course).
Can this remote origin be accessed via like one "git push" or one "git pull" regardless of what network my laptop is on?
On my laptop I tried,
git remote add origin ssh://gogma@223.x.x.x/home/gogma/git/prj.git
git remote set-url --add origin ssh://gogma@192.168.x.x/home/gogma/git/prj.git
didn't seem to work. no issues with ssh itself.
This is what I have:
$ git remote -v
origin ssh://gogma@223.x.x.x/home/gogma/git/prj.git (fetch)
origin ssh://gogma@223.x.x.x/home/gogma/git/prj.git (push)
origin ssh://gogma@192.168.x.x/home/gogma/git/prj.git (push)
$