Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown protocol error when using git-svn over HTTPS through a proxy server

Tags:

git

ssl

svn

git-svn

I've been encountering some problems attempting to access a Subversion repository via HTTPS using git-svn.

When I type git svn init --username=<my username> --trunk=https://<host>/<project>/trunk, I get the following error message:

RA layer request failed: PROPFIND request failed on '/<project>/trunk':
PROPFIND of '/<project>/trunk': SSL negotiation failed: SSL error: unknown
protocol (https://<host>) at C:\Program Files (x86)\Git/libexec/git-core\git-svn
line 2299

A couple of other points to note:

  1. I'm using msysgit 1.7.9.0 on Windows 7 x64. I also have the Subversion 1.7.1 command line client and TortoiseSVN 1.7.1 installed.
  2. I am connecting through a proxy server, which I have specified through both the HTTP_PROXY environment variable and git config http.proxy.
  3. I am able to clone Github repositories over HTTPS on the same machine without problems.
  4. The plain Subversion client checks out the same project without problems. I have also been able to clone it successfully with Mercurial and hgsubversion, although it did fail to recognise the server's SSL certificate, so I had to specify it explicitly in my mercurial.ini file. Because of this, I am using git config http.sslVerify=false. However, this does not make any difference.
  5. One-way workarounds such as using svnsync (as e.g. suggested here) are not an option.

Anything else that I haven't tried?

like image 536
jammycakes Avatar asked Mar 23 '12 15:03

jammycakes


1 Answers

To expand a little bit on the other two answers (and explain why you're seeing what you're seeing), git svn (as part of msysgit) is built against svn 1.4.6:

C:\> git svn --version
git-svn version 1.7.7.1.msysgit.0 (svn 1.4.6)

Note that 1.4.6 is... well... old. (And hasn't even been supported since 1.6 was released in 2009.)

msysgit's git-svn is not using your subversion install - so being able to checkout using your installed svn is (unfortunately) not indicative of the problem.

There are some bug reports about upgrading to a newer subversion for msysgit, but it appears that those have not yet materialized.

Have you tried cygwin's git-svn?

like image 71
Edward Thomson Avatar answered Nov 02 '22 03:11

Edward Thomson