git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Help! My ISP blocks repo.or.cz. How to push changes? (a solution)

From
Asheesh Laroia <asheesh@asheesh.org>
Date
Jan 14, 2009, 17:18 UTC
Message-ID
<alpine.DEB.2.00.0901140913310.23681@vellum.laroia.net>
In-Reply-To
<200901141455.23935.jnareb@gmail.com>
On Wed, 14 Jan 2009, Jakub Narebski wrote:
Show 10 quoted lines
> Jakub Narebski wrote:
>
>> The ISP I use (Telekomunikacja Polska S.A., aka TP) made some
>> unannounced changes for ADSL service (Neostrada) which made it block
>> repo.or.cz (and of course its aliases, including git.or.cz where git
>> wiki resides).
>
> Thank you all for your help with arriving at solution. I'll describe it
> below; perhaps it would help somebody else (now that it is in mailing
> list archive).

I'll just add some comments that explain what I suggested with a little more clarity. I'm not saying you have to use it or anything, I just want to make sure I was clear!

And I'm glad you have a solution!
Show 6 quoted lines
> First, let me explain what I am working with:
>
> I have access to shell account with set up SSH key access; let's name
> this machine host.example.com. I don't have admin rights there, and
> quota is quite tight; I have installed netcat (nc) in ~/bin - it is
> only 22 kB.
Yes, that is great!
> I don't know where to find SOCKS5 proxy, and I don't have 'tsocks' 
> installed either on my computer, or on shell account... I think.

tsocks is packaged in Debian, and surely in other distributions as well. You don't run it on the shell account, but on your own workstation (which I call "laptop" below for clarity).

A SOCKS5 proxy can be generated by ssh by running:
 	[user@laptop] $ ssh -D 1080 shelluser@shellbox
Now:
 	[user@laptop] $ telnet localhost 1080

will demonstrate that local port 1080 is listening. Because you created it with -D to ssh, that local port 1080 *is* a SOCKS5 proxy, created by the local SSH client.

Show 7 quoted lines
> Now, solutions:
>
> 1. For reading gitweb at repo.or.cz, and for reading and editing git
>   wiki at http://git.or.cz/gitwiki/ I use one of free HTTP proxies:
>   http://www.4proxy.de (first such proxy I have found that has an
>   option to _not_ obfuscate URLs; it still unnecessary escapes some
>   things like '/' in the query argument).

Great! (Though note that configuring the web browser to use your SSH-created SOCKS5 proxy would let you avoid this escaping since the whole system would be under your control.)

Show 19 quoted lines
> 2. For pushing changes to repo.or.cz I use SSH tunnel (I could have
>   used ProxyCommand solution with netcat instead[1]). I run:
>
>   $ autossh -M 2000 -f -N -L 2222:repo.or.cz:22 jnareb@host.example.com
>
>   at startup, and I have set the following in ~/.ssh/config:
>
>   # TP S.A. blocks repo.or.cz
>   Host repo.or.cz
>   	#ssh -f -N -L 2222:repo.or.cz:22 host.example.com
>   	NoHostAuthenticationForLocalhost yes
>   	HostName localhost
>   	Port 2222
>
>   [1] Alternate solution:
>
>   # TP S.A. blocks repo.or.cz
>   Host repo.or.cz
> 	ProxyCommand ssh host.example.com exec /home/jnareb/bin/nc %h %p
Right-o.
Show 15 quoted lines
> 3. For fetching changes via git:// protocol from repo.or.cz I use the
>   following setup in git config:
>
>   [core]
>   	gitProxy = ssh-proxy for "repo.or.cz"
>
>   Unfortunately example from Documentation/config.txt with "ssh" as
>   git proxy command doesn't work, and neither putting command with
>   options (e.g. "ssh host.example.com /home/jnareb/bin/nc") doesn't
>   work: the command is _not_ split on whitespace. So I had to use
>   helper script ~/bin/ssh-proxy:
>
>   #!/bin/sh
>
>   ssh host.example.com /home/jnareb/bin/nc "$1" "$2"
Great!
> I hope that would help somebody... and if somebody notices better 
> solution, hs/she would provide me with it :-)
(-:
-- Asheesh.
-- 
A visit to a fresh place will bring strange work.
Previous: Jakub NarebskiNext: Asheesh Laroia
Message 12 of 13 in “Help! My ISP blocks repo.or.cz. How to push changes?”
  1. Jakub NarebskiJan 12, 2009
  2. Alex RiesenJan 12, 2009
  3. Jakub NarebskiJan 12, 2009
  4. Luciano RochaJan 12, 2009
  5. Asheesh LaroiaJan 12, 2009
  6. Jakub NarebskiJan 12, 2009
  7. Asheesh LaroiaJan 13, 2009
  8. Mike HommeyJan 12, 2009
  9. Jakub NarebskiJan 12, 2009
  10. Markus HeidelbergJan 13, 2009
  11. Jakub NarebskiJan 14, 2009
  12. Asheesh LaroiaJan 14, 2009
  13. Asheesh LaroiaJan 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.