问题
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?
回答1:
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.
回答2:
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.
回答3:
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.
来源:https://stackoverflow.com/questions/750120/ra-layer-request-failed-while-git-svn-fetch