[petsc-dev] How to compose a git URL for going through 2 machines

Nystrom, William David wdn at lanl.gov
Thu Nov 6 12:35:59 CST 2014


Satish,

I tried your suggestion but it failed.  The problem was that nc was not a recognized command
on red-wtrw - presumably because it runs a restricted shell.

I have an email in to the LANL consultants asking how I should do this - since LANL maintains
red-wtrw.

I've also tried some other suggestions various people have suggested but have not found
something that works yet.

Thanks,

Dave

--
Dave Nystrom
LANL HPC-5
Phone: 505-667-7913
Email: wdn at lanl.gov
Smail: Mail Stop B272
       Group HPC-5
       Los Alamos National Laboratory
       Los Alamos, NM 87545


________________________________________
From: Satish Balay [balay at mcs.anl.gov]
Sent: Wednesday, November 05, 2014 12:50 PM
To: Nystrom, William David
Cc: petsc-dev at mcs.anl.gov
Subject: Re: [petsc-dev] How to compose a git URL for going through 2 machines

just concentrate on setting up ssh tunnel. git shouldn't have to deal
with it. Look for 'ssh ProxyCommand' [google]

Perhaps the following will work for you.

Add the following to ~/.ssh/config

Host lu-fe1.lanl.gov
  ProxyCommand ssh -q -a -x wdn at red-wtrw.lanl.gov /bin/nc %h %p

Now you check if ssh works:

ssh lu-fe1.lanl.gov ls /usr/projects/artab/users/wdn/repos/git/petsc

And then use:

git clone lu-fe1.lanl.gov:/usr/projects/artab/users/wdn/repos/git/petsc

Satish

On Wed, 5 Nov 2014, Nystrom, William David wrote:

> I was wondering if anyone might know the solution to a problem I am having with
> composing a git URL for cloning a git repo that is two machines away.
>
> I'm trying to execute the following git command:
>
> git clone ssh://wdn@red-wtrw.lanl.gov/lu-fe1.lanl.gov/usr/projects/artab/users/wdn/repos/git/petsc
>
> I've also tried the following:
>
> git clone ssh://wdn@red-wtrw.lanl.gov:lu-fe1.lanl.gov/usr/projects/artab/users/wdn/repos/git/petsc
>
> And also
>
> git clone ssh://wdn@red-wtrw.lanl.gov:lu-fe1.lanl.gov:/usr/projects/artab/users/wdn/repos/git/petsc
>
> Basically, I have to go through a gateway machine running a restricted shell
> to get to a machine which mounts the filesystem where my git repo is located.
> Each of the above commands fail.
>
> However, I can run the following scp command successfully:
>
> scp -p file_name wdn at red-wtrw.lanl.gov:lu-fe1.lanl.gov:/usr/projects/artab/users/wdn
>
> So I'm wondering if there is a way to chain together two machines in a git URL like I can
> with scp or whether there is some fundamental reason why this just will not work.  Does
> anyone know if what I am doing is possible and if so, how?  Or do I have to set up and
> use an ssh tunnel?
>
> Thanks,
>
> Dave
>
> --
> Dave Nystrom
> LANL HPC-5
> Phone: 505-667-7913
> Email: wdn at lanl.gov
> Smail: Mail Stop B272
>        Group HPC-5
>        Los Alamos National Laboratory
>        Los Alamos, NM 87545
>
>




More information about the petsc-dev mailing list