views:

906

answers:

3

I'm trying to grab the sourcecode for Bro. If I put "http://svn.icir.org/bro/trunk/bro/" into my browser I can see the repository just fine. However, if I try the command "svn co http://svn.icir.org/bro/trunk/bro" I get an error:

svn: PROPFIND request failed on '/bro/trunk/bro'
svn: PROPFIND of '/bro/trunk/bro': could not connect to server (http://svn.icir.org)

A little googling seems to indicate I should change my ~/.subversion/servers file to include

[global]
http-proxy-exceptions = ???
http-proxy-host = ???
http-proxy-port = ???
http-proxy-username = ???
http-proxy-password = ???

But I don't know what actual values to use. My browser is set to use a proxy configuration script, let's pretend it's "some.url.mycompany.com:port/file.name"

Any ideas how I can infer the right values for the svn proxy given the http proxy? Is this something I need the IT guys to set up for me?

A: 

Generally the easiest way to fix this is to browse to the repository in Fire Fox...accept the SSL cert that is passed...and remember that acceptance. Then you can browse via SVN/Tortoise without any problems.

Andrew Siemer
I tried that, but a) it didn't ask me to accept a cert and b) even after browsing in firefox, SVN wouldn't work. I don't use Tortoise, so that might make a difference somehow.
PlexLuthor
@Andrew there is no SSL in his question.
joeforker
+3  A: 

Are you able to view the proxy config file? If so you should be able to determine which server and port to use. If you don't need to sign in to access the internet you can probably leave the username and password blank. Likewise for the exceptions.

When I was at a company that use a proxy config file I was able to browse to the file to see how the filtering was handled.

Example proxy config file from WikiPedia (though I am sure these files vary greatly based proxy software being used):

function FindProxyForURL(url, host) {
  // our local URLs from the domains below example.com don't need a proxy:
  if (shExpMatch(url,"*.example.com/*"))                  {return "DIRECT";}
  if (shExpMatch(url, "*.example.com:*/*"))               {return "DIRECT";}

  // URLs within this network are accessed through 
  // port 8080 on fastproxy.example.com:
  if (isInNet(host, "10.0.0.0",  "255.255.248.0"))    {
     return "PROXY fastproxy.example.com:8080";
  }

  // All other requests go through port 8080 of proxy.example.com.
  // should that fail to respond, go directly to the WWW:
  return "PROXY proxy.example.com:8080; DIRECT";
}

If the url of the repository does not match any of the rules (so would use: PROXY proxy.example.com:8080; DIRECT):

[global]
# http-proxy-exceptions = ???
http-proxy-host = proxy.example.com
http-proxy-port = 8080
# http-proxy-username = ???
# http-proxy-password = ???
Jesse
+1  A: 

It sounds like you are trying this at your workplace, and your network administrator has set up a proxy server to allow web traffic through. All other traffic is blocked unless you are using the proxy (That's why you have the proxy setting in your browser to allow your browser to function)

Also keep in mind the proxy itself could be doing further filtering, so even if you manage to use the proxy server for your SVN, that traffic may still be blocked. It all depends on how tight security is on your network.

In my opinion you are better off just asking your IT department to give you the details of the proxy server. They may even give you a different one to use for your purpose. Or maybe they can just adjust their firewall policy to allow the type of traffic you are trying to pass through.

Trying to dig through the clues from your browser's proxy settings and using that is a hit-or-miss.

Roberto Sebestyen
+1 on bypassing the proxy. I had a similar problem where the proxy broke Subversion because it did not understand PROPFIND and other SVN verbs. We were able to bypass by using https://. The URL in the question does not do https:// so you will need to ask your IT department to let you bypass the proxy.
joeforker