Access a git repo on local network drive through proxy

Viewed 216

I currently have a git repo stored on a local network drive. A few windows 10 PCs commit to this repo on a daily basis and access it through the local 'file://' protocol (I do not have admin control over the network so unable to install an actual git server like gitea).

The problem now, is that I would like to have a linux (Ubuntu Desktop 20.04) computer that is connected to the network get access to the git repo (push/pull) on the network drive. I've been told that the network drive does not work well with linux and I don't have any further details about the setup. Given that mounting the network drive on the linux machine is not an option, is it possible to access the git repo by using one of the windows PCs as a proxy? perhaps using an ssh tunnel? I am currently able to ssh/vnc into the linux PC from other windows PCs.

I have seen the following tutorials and a few others, but they all seem to be connecting to an actual git server. I would like this to work with the local 'file://' protocol if possible.

1: git through ssh tunnel

2: use proxy for git/github

I'm open to any viable solution within the limitation of my setup/circumstances. Moving the repo to an online host like github is not an option.

1 Answers

they all seem to be connecting to an actual git server

Using an SSH tunnel does not rely on an actual Git (GitLab/Gitea/...) server on the target side.

As long as the repository path is accessible through SSH (try a simple ls, for testing), git operations will work.

Using SSH does not mean using a "Git" server, only the remote side SSH daemon.

Related