I have my Git repo on my machine, which has no public IP of its own, at home; I want to clone this repo at my web server. Is it correct that a reverse tunnel will allow me to pull from my machine to the server? What command(s) do I issue to perform the clone? My local machine runs Windows; the server runs Ubuntu.
Share
In principle, you can do something like
and then use on your webserver
This will encrypt your data twice, though.
Alternatively, you can use any of the other protocols which git supports, and forward the right ports for these.
You can also put a section like this into ~/.ssh/config:
Then you can use this clone command:
git clone git@my-server:mytools/projectName.git. (This allows you to store the server’s key not as belonging tolocalhost, and makes the URL in your git config clearer.)For your server (both the tunnel server and the final host) you usually want to authenticate per public-key authorization, for this you should put the private key (e.g. id_rsa) in your ~/.ssh directory. (And all files there, specifically the private key, should be readable only for your user, and the directory writable only for your user.)
All this is not specific for the tunnel, but generic SSH stuff.