Pages

Tuesday, May 20, 2008

Development behind a proxy

Some of the problems you will encounter when trying to use the development tools from behind a http proxy. I have been sorting these out this week to be able to spend some evening hours on AbTLinux development and wanted to post the results here.

Subversion:
The problem here is that we need to checkout code and commit our changes to the repository. Normal anonymous checkouts are taken as so:

$ svn co http://svn2.assembla.com/svn/abtlinux

# To do this over a proxy you need to either set the
# global subversion server configuration to include a
# proxy machine address and a port specification, or
# you can put this in your users home directory
# configuration. Bother are shown here.

/etc/subversion/servers

~/.subversion/servers

# Put this in the servers file in the global section.

[global]
http-proxy-host = your-proxy-hostname
http-proxy-port = 8081

# A commit of code changes on this project as checked
# out above encounters the following error.

$ svn commit -m "Your commit message"

svn: Commit failed (details follow):
svn: MKACTIVITY of '/svn/abtlinux/!svn/act/e0331bc3-e9e7-': 400 Bad Request

# To commit your changes you need to be on the https
# version of the code repository, so you can migrate
# your existing checkout as follows.

$ svn switch --relocate
http://svn2.assembla.com/svn/abtlinux https://svn2.assembla.com/svn/abtlinux


Wget:
Finally, I ran into some wget problems when trying to download package sources. The only way to get wget to run is to set an environment variable to point to your http proxy.

$ export http_proxy="proxy-servername:8081"

1 comment:

  1. Thank you for the --relocate trick! Worked for me with no pain.

    ReplyDelete

Note: Only a member of this blog may post a comment.