Using Git, how can I add a remote from my local machine to a virtual machine (for hosting) that is only accessible from a secondary machine?
So to access this machine I would normally have to ssh into the first, then ssh into the second from the first one.
Is there a way to git remote add prod ssh://user@server1.co.uk > ssh://user@server2.co.uk/app-deployment.git from my local machine?
Or will I have to set up another remote in the middle server with more hooks?
EDIT: The working repository is on my local machine, but the --bare repository I want to add as a remote is on "server2", there's no repository or code on server1, but I can only reach "server2" through ssh from "server1".