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

I’ve been encountering some problems attempting to access a Subversion repository via HTTPS using gitsvn.

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?

  • Migrating to maven from an unusual svn directory structure?
  • Jenkins - passing updated revision to downstream jobs
  • java svnkit: read content of file directly from repository, without exporting it
  • Any nice way to generate a timeline view of commits from subversion?
  • How do I get a list of all unversioned files from SVN?
  • Recipe for making Cocoa NSDocument packages play well with svn?
  • How do I use Eclipse Refactoring Tools and stay in sync with SVN through Subclipse?
  • svn.exe process showing as “Suspended” in process explorer - unable to kill
  • 4 Solutions collect form web for “Unknown protocol error when using git-svn over HTTPS through a proxy server”

    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?

    The message you are getting (SSL23_GET_SERVER_HELLO:unknown protocol) is easy to google. E.g. here or here Looks like you have the https or dns servers misconfigured and nothing to do with git.

    Offering a slightly less terse answer, kan is correct. The reason why you are seeing this is your upstream repository isn’t properly configured for SVN+HTTPS. This can be due to a misconfiguration at the server end, or it can be due to a difference in the SVN protocol being served versus what your client expects.

    The errata provides the correct debugging scenarios for this problem. If you have control over the SVN repository in question, please ensure its HTTPS configuration is working properly to proceed using this as your upstream repository. If you wish to change the protocol or URL being used to further troubleshoot the connection (for example, to try over HTTP or SSH), here’s the guide you’ll need.

    I’ve finally discovered how to get it to work. The answer came from this thread.

    When you’re connecting to a Subversion server through a proxy, git-svn doesn’t use the proxy settings in .gitconfig, nor does it use the settings you configure in TortoiseSVN. Instead, it looks in the [global] section of %USERPROFILE%\.subversion\servers.

    Adding our proxy server settings to this file allowed me to connect to an external Subversion server.

    Git Baby is a git and github fan, let's start git clone.