• Explore Vox
  • Culture
  • Entertainment
  • Life
  • Music
  • News & Politics
  • Technology
  • Join Vox
  • Take a Tour
  • Already a Member? Sign in
xrd

xrd’s blog

  • xrd’s Blog
  • Profile
  • Neighbors
  • Photos
  • More 
    • Audio
    • Videos
    • Books
    • Links
    • Collections

Using GIT over a tethered G1 connection

  • Feb 23, 2009
  • Post a comment

The G1 is awesome because you can setup a SOCKS proxy and browse (using a web browser) anywhere you have T-Mobile service.  This means I don't ever have to worry about a wifi connection, and I am considering cancelling my DSL because the G3 network is actually fast enough to download files at a reasonable clip.  However, a SOCKS proxy only works through your browser, and therefore, other services are not possible.  Which means I cannot use GIT to checkin files.  If I am using my G1 for internet access, I am probably traveling.  And, if I am traveling and coding, it makes me very nervous to not be able to push my files up in case my laptop were stolen.  I really wanted to figure out a way to use GIT with my tethered android phone. 

To use this, first install tetherbot.  To use the tethering for browsing using a web browser, you plug in the phone, enable USB debugging, and then start the SOCKS proxy on your phone.  Then, you setup a proxy in your browser, which can either be the default installed proxy, or something like Foxy Proxy.  I used Foxy Proxy. 

The second option in Tetherboth is to create a tunnel.  In my case, I want to tunnel connections through my phone out to github.  And, I want to use the SSH port (22) which is what git uses in this case when it wraps the push inside an SSH connection.  I enter "github.com" into the first field marked "IP Address or Hostname" and then 22 into the "Port Forward To"

Now I need to connect the tunnel.  From within the tools directory in the Android SDK I run: /adb forward tcp:4444 localabstract:Tunnel.  This connects connections made on port 4444 from my laptop to the other forward on the android phone.

This is a different port than 22 which is the default SSH port, and we need to tell SSH to use this, so that when git uses SSH to wrap the connection it uses the proper port.  To do this, I added two lines to ~/.ssh/config:

Host tunnel.github.com
Port 4444

Then, in /etc/hosts I added:

127.0.0.1       tunnel.github.com

This is a bit of trickery that allows me to tell any service that a connection to tunnel.github.com should actually go through my laptop rather than out to a real server on the internet. 

Once this is done, I just add a remote repository to my local git repo.

git remote add tunnel git@tunnel.github.com:xrd/

vital.git

And, then I can push like this:

git push tunnel

And, I can still push to my regular repository by using the normal git push.

Post a comment Tags: g1 tether android git

i can has cheezburger

  • Oct 27, 2007
  • Post a comment
26102007084
26102007084
Post a comment

Pumpkins

  • Oct 23, 2007
  • Post a comment
22102007072
22102007072
22102007075
22102007075
22102007073
22102007073
22102007076
22102007076
22102007074
22102007074
22102007078
22102007078
22102007079
22102007079
22102007077
22102007077
Post a comment

Pumpkin carving

  • Oct 21, 2007
  • Post a comment
21102007055
21102007055
21102007056
21102007056
21102007057
21102007057
21102007054
21102007054
Post a comment

Rainbow

  • Oct 21, 2007
  • Post a comment
20102007052
20102007052
Post a comment

Lifeblog post

  • Oct 13, 2007
  • Post a comment
Gilberto, on the front lawn
Gilberto, on the front lawn
Living room
Living room
Fireplace in the living room
Fireplace in the living room
Front of the house
Front of the house
Living room looking outside
Living room looking outside
Bed room
Bed room
Post a comment

Lifeblog post

  • Oct 13, 2007
  • Post a comment
Kitchen
Kitchen
Post a comment

Lifeblog post

  • Oct 13, 2007
  • Post a comment
Computer/Music room
Computer/Music room
Post a comment

Lifeblog post

  • Oct 13, 2007
  • Post a comment
Bathroom
Bathroom
Post a comment

About Me

xrd
United States
View my profile

Neighborhood

  • Team Vox
    Team Vox Updated: Jun 17, 2009

Explore friends, family, friends & family, or entire neighborhood.

View my neighbors

Tags

  • g1 tether android git
  • house

View my tags

Archives

  • February 2009 (1)
  • October 2007 (8)
  • 2009 (1)
  • 2007 (8)

Subscribe

  • Subscribe to a feed of these posts
  • Powered by Vox
  • Theme designed by Lilia Ahner
  • Use this theme

Photos

  • 26102007084
  • 22102007077
  • 22102007079
  • 22102007078
  • 22102007074
  • 22102007076
  • 22102007073
  • 22102007075
  • 22102007072

View more of my photos

Collections

  • Mirror Lake Trip

View more of my collections

  • Home
  • Explore
  • Tour Vox
  • Start a Vox Blog
Already a member? Sign in

Back to top

View Vox in your language: English | Español | Français | 日本語

Brought to you by Six Apart, creators of Movable Type, Vox and TypePad.
Six Apart Services: Blogs | Free Blogs | Content Management | Advertising

Vox © 2003-2008 Six Apart, Ltd. All Rights Reserved.
Help | Learn More | Terms of Service | Privacy Policy | Copyright | Advertise | Get a Free Vox Blog

Loading…

Adding this item will make it viewable to everyone who has access to the group.

Adding this post, and any items in it, will make it viewable to everyone who has access to the group.

Create a link to a person
Search all of Vox
Your Neighborhood
People on Vox

(Select up to five users maximum)

Vox Login

You've been logged out, please sign in to Vox with your email and password to complete this action.

Email:
Password:
 
Embed a Widget
Widget Title: This is optional
Widget Code: Insert outside code here to share media, slideshows, etc. Get more info
OK Cancel

We allow most HTML/CSS, <object> and <embed> code

Processing...
Processing
Message
Confirm
Error
Remove this member