“Network connection closed unexpectedly” upon svn checkout

后端 未结 15 2173
情话喂你
情话喂你 2021-01-17 17:51

When I attempt to checkout:

svn checkout svn+ssh://serveradmin%foo@foo.com/home/87292/data/svn/repository/trunk .

I get this (unhelpful) er

相关标签:
15条回答
  • 2021-01-17 18:43

    Make sure you did not have a spurious colon in your svn url

    It should NOT be:

        user@host.com:/path/to/repo 
                     ^
                     spurious colon should be removed  
    

    but should be:

        user@host.com/path/to/repo
    
    0 讨论(0)
  • 2021-01-17 18:45

    OK. Here’s how I fixed this (on Mac OS X, but fix should work on any client)

    This particular issue arises when you are using a non-standard port (let’s say 12001 for sake of example) for your SSH server.

    Apparently the SVN client experiences syntax errors when given a port address on a command line like this one:

    svn list svn+ssh://username@domainname.com:12001/home/username/svn/myproject
    

    So, to fix this, you need to create a client-side config file for SSH like this:

    cd ~
    cd .ssh
    vi config (create a config file like the one that follows)
    :w
    :q
    

    Config file located in ~/.ssh/config:

    Host domain.com
    User username
    Port 12001
    

    Then, issue your svn+ssh command WITHOUT the port like this:

    svn list svn+ssh://username@domain.com/home/username/svn/myproject
    

    That’s it!

    Hope that helps. Rick

    0 讨论(0)
  • 2021-01-17 18:47

    If you're using Putty, it saves your login credentials thus might make tortoise give the following error when you try to checkout: Connection closed unexpectedly. If this occurs open up putty and click on default settings so that the Host Name is loaded. Clear the host name and save. This worked for me...

    0 讨论(0)
提交回复
热议问题