123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- Assuming you had a domain name, everything should work now via regular internet
- connections. But if you want to make your server accessible via I2P, we'll need
- to change some things. Assume the I2P eepsite name you want is mysite.i2p and
- the gitweb interface will be at git.mysite.i2p.
- Go to the gitweb configuration at /etc/gitweb.conf and change the URLs to point
- to the correct address, e.g. $logo\_url should point to mysite.i2p and not
- mysite.org.
-
- In the same file, change the URLs for @git\_base\_url\_list to these:
- git://localhost:8951
- ssh://git@localhost:8950
- Go to the server configuration at /etc/lighttpd/lighttpd.conf and change the
- gitweb host address to git.mysite.i2p, and change server.port from 80 to 7658.
- If you want both I2P and clearnet access, you leave it 80 but then you need to
- update the eepsite server tunnel to point to 80 as well.
- Using your favorite browser for I2P go <http://127.0.0.1:7657/configclients>. We
- need to turn off the built-in eepsite server, Jetty, so lighttpd can take over.
- Untick "I2P webserver (eepsite)" so it doesn't run at startup anymore, and click
- "Stop" to stop it. In case you need it, the default page you used to see when
- browsing to your eepsite (i.e. localhos:7658) can be found at
- /usr/share/i2p/eepsite/docroot/help/index.html.
- Load the new lighttpd config by running `service lighttpd reload` as root. If it
- reports the port is in use, make sure you stopped Jetty (and any other webserver
- you don't intend to use) and retry.
- Go to <http://127.0.0.1:7657/i2ptunnel>. We're going to setup several tunnels
- here. First, start the eepsite server tunnel (should be at the top of the page).
- Create the following server tunnels:
- + HTTP server tunnel (for Gitweb)
- - Name: gitweb (doesn't really matter)
- - Description: Web interface for git repos (doesn't really matter)
- - Target host: 127.0.0.1
- - Target port: 7658
- - Website name: git.mysite.i2p (the same you filled for the gitweb host in
- /etc/gitweb.conf)
- - Check the Auto-Start box
- + Standard server tunnel (for git daemon)
- - Name: git-daemon (doesn't really matter)
- - Description: Anonymous git:// access (doesn't really matter)
- - Target host: 127.0.0.1
- - Target port: 9418 (the same port git-daemon listens to)
- - Check the Auto-Start box
- + Standard server tunnel (for ssh access)
- - Name: ssh server (doesn't really matter)
- - Description: Authenticated ssh:// access (doesn't really matter)
- - Target host: 127.0.0.1
- - Target port: 22 (the same port openssh-server listens to)
- - Check the Auto-Start box
- We'll go back here to create client tunnels, but first let's create entries in
- the local addressbook for the new server tunnels. Copy the Local Destination
- field in the gitweb server tunnel configuration page (the long random-looking
- string), then go to <http://localhost:7657/dns> and switch to the Master
- addressbook. Here, create a new address with the name git.mysite.i2p and paste
- the destination you copied.
- Now repeat the same process for the git-daemon tunnel with address
- *anon.git.mysite.i2p* and for the ssh tunnel with address *auth.git.mysite.i2p*.
- Now, if you didn't create an addressbook entry for your eepsite before, repeat
- the same step for the eepsite server tunnel with address mysite.i2p.
- Client tunnels need to be added on the client side, i.e. by each team member on
- their i2p router. I suggest you do it first on your machine even if it's the
- same machine which runs the server, so you can easily test the connection.
- Anyway, here are the steps: Go to the tunnel configuration page and add the
- following client tunnels:
- + Standard client tunnel (for git daemon)
- - Name: anon.git.mysite.i2p (doesn't really matter)
- - Description: git:// access (doesn't really matter)
- - Reachable by: 127.0.0.1
- - Port: 8951 (can be any other unused port, as long as you remember to use it
- when using git)
- - Destination: anon.git.mysite.org
- - Check the Auto-Start box
- - If you want, check the *Reduce tunnel quantity when idle* box
- + Standard client tunnel (for ssh server)
- - Name: auth.git.mysite.i2p (doesn't really matter)
- - Description: ssh:// access (doesn't really matter)
- - Reachable by: 127.0.0.1
- - Port: 8950 (can be any other unused port, as long as you remember to use it
- when using git)
- - Destination: auth.git.mysite.org
- - Check the Auto-Start box
- - If you want, check the *Reduce tunnel quantity when idle* box
- Done! Now let's test the new configuration. If something doesn't work you can
- try restarting the I2P router or individual tunnels. Any repository will work;
- the example below uses the 'testing' repo preinstalled by gitolite.
- $ cd /home/alice/git-repos
- $ git clone git://localhost:8951/testing.git
- $ rm -R testing
- $ git clone ssh://git@localhost:8950/testing.git
- $ cd testing
- $ touch dummy
- $ git add dummy
- $ git commit
- $ git push origin master
- These commands test git:// pull and SSH in both directions, pull and push. If it
- was successful, the only thing left is to annouce the new eepsite and register
- it with address servers so finding it is becomes easier.
- [[TODO|TODO/OPEN]]
- - explain HTTP for interested people
- - write summary of commands
- - fix numbering of the references
- - fix code sections according to valid markdown
- - setup domain with namecoin
- - customize gitweb icons and CSS and add HTML
- - add support for categories, preferrably find a way to set them in
- gitolite.conf (e.g. modify the gitolite post-commit hook and invent some
- syntax for having the category on the repo line along with owner and
- description)
|