I am working on a machine that does not have direct access to the internet, but other nodes on the domain do. This means that I can ssh to another machine to sync my git repo, but I cannot do it from the machine itself.
> git clone https://git.example.com/git/myproj.git ~
fatal: unable to access 'https://git.example.com/git/myproj.git'
> ssh machine2
> git clone https://git.example.com/git/myproj.git ~
successfully cloned into '~/myproj'
I would like to be able to use machine2
as a proxy to connect to the git server. Unfortunately, machine2
is not configured as an http proxy, and the git server is not configured to use the git://
or ssh://
protocols. Is there a way that I can use machine2
as a proxy to establish an https connection with git.example.com
? Note that I do not have sudo privileges on machine2
.
Update:
A complicating factor appears to be the fact that I am using a private key to authenticate with the HTTPS server. In my ~/.gitconfig
I have the following lines
[http]
sslkey = /home/nispio/.ssl/example.key.pem
sslkey = /home/nispio/.ssl/example.crt.pem
sslcainfo = /home/nispio/.ssl/example-ca.crt.pem
All of this is configured properly, as evidenced by the fact that I can successfully clone the repo from machine2
using these credentials. Attempting to use a simple socks server as proposed by @IporSircer however, does not seem to forward my credentials properly.