You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Before you clone the GIT repository to your Tunneling Destination

1) On the Linux machine (tunneling destination)  that you will clone the github from, generate a SSH key (if not already done)

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

2) Add a new SSH key to your GitHub account

https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

3) Setup for large filesystems on github

$ git lfs install


Temporary Tunneling at SLAC

The tricky part is you need to tweak your .ssh/config file to do the checkout but this will impact your other checkouts. So you need to add the following lines to .ssh/config and then comment them out after you do the checkout:

  • Connect to github via proxy

$ Host github.com

$ User git

$ ProxyCommand ssh ppa-pc87444 /usr/bin/nc %h %p

# Log into server
$ ssh rdusr219

# perform all your github pull/push operations
$ git .......


Temporary Tunneling at CERN (pddaq-gen02-ctrl0)

Prerequest Access to lxplus.

 

GitHub Access

Setup ssh-key as described above. Append the following lines to ~/.ssh/config:

 
Host github.com
    User git
    ProxyCommand ssh USER@lxplus.cern.ch -W %h:%p

 

GitHub LFS Access

# Log into server
$ ssh pddaq-gen02-ctrl0

# Source environment script
$ source /daq/rce/setup_env.sh

# Start the SOCKS2HTTP
$ HttpTunnelStart

# perform all your github pull/push operations
$ git .......

# Stop the SOCKS2HTTP before logging out 
$ HttpTunnelStop

 

 

Currently git-lfs (v2.0.x)  supports HTTP/HTTPS access only. SOCK5 proxy is on the v2.1 roadmap.

https://github.com/git-lfs/git-lfs/milestone/7

 

A possible solution is to setup a SOCK5 tunnel to lxplus via ssh, and convert SOCKS to HTTP using polipo on the daq machine.

https://github.com/jech/polipo

An excitable can be found at pddaq-gen02:/daq/rce.

 

Notes

  • modify USER to your lxplus username
  • if you login to the daq machine as pduser, you still have to use your own lxplus username in the ssh config.
  • for password-less operations, you can create a kerberos ticket by "kinit USER@CERN.CH" (replace USER to your lxplus username).

Contact

Patrick Tsang

kvtsang@slac.stanford.edu

 

 

  • No labels