3

I can't commit .htaccess files from my Windows SVN client (TortoiseSVN). The error that is returned is:

Could not read status line: Existing connection was forcibly closed by the remote host.

And here is basically what my vhost looks like in Apache:

<VirtualHost *:80>
  DocumentRoot /var/www/mydomain.com/legacy/trunk/html
  ServerName mydomain.com

  <Directory /var/www/>
    FileETag MTime Size
    AllowOverride All
  </Directory>

  <Directory /var/www/tools>
    AllowOverride All
  </Directory>

  <Location /svn>
    DAV svn
    SVNPath /var/svn/repos/MyRepo

    # Limit write permission to list of valid users.
    # Require SSL connection for password protection.
    # SSLRequireSSL
    ErrorDocument 404 default

    AuthType Basic
    AuthName "Authorization Realm"
    AuthUserFile /etc/httpd/conf/.htpasswd
    Require valid-user
  </Location>
</VirtualHost>

How can this be changed, so that .htaccess files can be committed?

Sebastian Zartner
  • 18,808
  • 10
  • 90
  • 132
user38968
  • 661
  • 1
  • 8
  • 8

6 Answers6

5

Just found out how to fix that issue - just put this into your virtual host configuration in order to override global http.conf:

<Files ~ "^\.ht">
    Order allow,deny
    Allow from all
    Satisfy All
</Files>

Source

THIS is the correct answer for sure (tested), but the op abandoned his question :/

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
1

Subversion is being served from an Apache server that's also using .htaccess for access control, so it might be preventing you from doing something you don't quite intend.

Dean J
  • 39,360
  • 16
  • 67
  • 93
0

check the apache error log file. You might see additional info about why the svn server failed to finish the commit.

Stefan
  • 43,293
  • 10
  • 75
  • 117
0

Check other apache config files. In my default /etc/apache2/modules.d/00_default_settings.conf (on a gentoo install), I have a FilesMatch "^.ht" section that does Deny from all.

I'd suggest running a grep -r -i "\\.ht" * from the /etc/apache or /etc/httpd or /etc/apache directory, to see what you come up with.

It may also be an AccessFileName directive, so grep for that too.

leander
  • 8,527
  • 1
  • 30
  • 43
  • 1
    It's not really recommend to enable serving .htaccess files on global level. This might be just fine if the server is only hosting repositories - but what if regular web-sites reside there as well? – Martin Zeitler May 30 '12 at 08:26
0

Are other files committing from TortoiseSVN?

If the commit is working from an SVN client on the same box as TortoiseSVN on the same working copy (can you verify?), then my guess would be different SVN and TortoiseSVN client versions causing the problem.

TortoiseSVN -> About will report the SVN client version is was built with. Check that your client/server versions are compatible.

si618
  • 16,580
  • 12
  • 67
  • 84
  • Yes, all other files seem to be committing fine. The server is using svn, version 1.4.2 and Turtoise is using the latest version which is TortoiseSVN 1.6.5, Build 16974. Is there a conflict here that I'm missing? – user38968 Oct 16 '09 at 16:09
  • If other files are committing OK then it's probably not the client version (even though you're on different minor versions)...just trying to eliminate the obvious :) – si618 Oct 16 '09 at 22:10
0
<Files ~ "^\.ht">
    Order allow,deny
    Allow from all
    Satisfy All
</Files>

This worked for me too. With a slight complexity I was doing it on a plesk server.

After adding above lines to my vhost file created in

/var/www/vhosts/system/[your domain]/conf

I ran following to rebuild the conf files

/usr/local/psa/admin/sbin/httpdmng  --reconfigure-domain [your domain]

and the comit worked!

Thanks, hope this helps people using plesk

user1280545
  • 33
  • 1
  • 4