<div dir="ltr">You want an SSH tunnel uses local port forwarding. The instructions here are pretty clear: <a href="https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding">https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 5, 2014 at 2:42 PM, Nystrom, William David <span dir="ltr"><<a href="mailto:wdn@lanl.gov" target="_blank">wdn@lanl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was wondering if anyone might know the solution to a problem I am having with<br>
composing a git URL for cloning a git repo that is two machines away.<br>
<br>
I'm trying to execute the following git command:<br>
<br>
git clone ssh://<a href="http://wdn@red-wtrw.lanl.gov/lu-fe1.lanl.gov/usr/projects/artab/users/wdn/repos/git/petsc" target="_blank">wdn@red-wtrw.lanl.gov/lu-fe1.lanl.gov/usr/projects/artab/users/wdn/repos/git/petsc</a><br>
<br>
I've also tried the following:<br>
<br>
git clone ssh://wdn@red-wtrw.lanl.gov:l<a href="http://u-fe1.lanl.gov/usr/projects/artab/users/wdn/repos/git/petsc" target="_blank">u-fe1.lanl.gov/usr/projects/artab/users/wdn/repos/git/petsc</a><br>
<br>
And also<br>
<br>
git clone ssh://wdn@red-wtrw.lanl.gov:lu-fe1.lanl.gov:/usr/projects/artab/users/wdn/repos/git/petsc<br>
<br>
Basically, I have to go through a gateway machine running a restricted shell<br>
to get to a machine which mounts the filesystem where my git repo is located.<br>
Each of the above commands fail.<br>
<br>
However, I can run the following scp command successfully:<br>
<br>
scp -p file_name wdn@red-wtrw.lanl.gov:lu-fe1.lanl.gov:/usr/projects/artab/users/wdn<br>
<br>
So I'm wondering if there is a way to chain together two machines in a git URL like I can<br>
with scp or whether there is some fundamental reason why this just will not work. Does<br>
anyone know if what I am doing is possible and if so, how? Or do I have to set up and<br>
use an ssh tunnel?<br>
<br>
Thanks,<br>
<br>
Dave<br>
<br>
--<br>
Dave Nystrom<br>
LANL HPC-5<br>
Phone: <a href="tel:505-667-7913" value="+15056677913">505-667-7913</a><br>
Email: <a href="mailto:wdn@lanl.gov">wdn@lanl.gov</a><br>
Smail: Mail Stop B272<br>
Group HPC-5<br>
Los Alamos National Laboratory<br>
Los Alamos, NM 87545<br>
<br>
</blockquote></div><br></div>