15

I use git svn to sync with the subversion repos:

$ mkdir prj && cd prj
$ git svn init http://url/to/repos/branches/experimental
$ git svn fetch

and got the error message:

RA layer request failed: OPTIONS of 'http://url/to/repos/branches/experimental':
Could not read status line: connection was closed by proxy server 
(http://url/to/repos) at /usr/bin/git-svn line 1352

Why and how can I fix this?

okidogi
  • 369
  • 1
  • 5
  • 14

3 Answers3

8

I had the same issue when accessing a SVN repo through a proxy.

The solution for me was to edit ~/.subversion/servers and add the needed proxy to the [globals] section. Uncomment the relevant lines (http-proxy-host, http-proxy-port, optionally http-proxy-username and http-proxy-password) and enter the needed information there.

This is needed because git svn uses the settings stored in ~/.subversion/servers to access SVN repositories.

eckes
  • 64,417
  • 29
  • 168
  • 201
3

It seems like this is a timeout issue on the server. Here's one bug report (I can't access the ticket it's a duplicate of, unfortunately). It's happening a lot to me, but if I just try the command again, it gets a little farther before timing out again. Eventually, I'll have the whole repository, and won't have to do this again, I hope.

Nate Parsons
  • 14,431
  • 13
  • 51
  • 67
2

I witnessed the similar

Could not read response body: connection was closed by server

I was able to resolve it by setting Timeout to 6000 in the Apache config.

Greg Rundlett
  • 1,056
  • 9
  • 11