Enable password in both commit and checkout

2020-03-30 16:42发布

问题:

I setup a svn repository according to this resource http://anandafit.info/2010/11/03/setup-a-subversion-server/

But server ask user name and password when I commit my code only and not asking password for svn checkout process. seems to be I have not enable the user name password for read process for svn server. How can I enable this feature.

回答1:

The link you post suggest this Apache configuration:

<Location /svn/svnproject>
    DAV svn
    SVNPath /home/svn/svnproject
    AuthType Basic
    AuthName "Svnproject Repository"
    AuthUserFile /etc/subversion/passwd
    <LimitExcept GET PROPFIND OPTIONS REPORT>
        Require valid-user
    </LimitExcept>
</Location>

The LimitExcept block is there to make checkout allowed without logging in, I'd replace it with just Require valid-user:

<Location /svn/svnproject>
    DAV svn
    SVNPath /home/svn/svnproject
    AuthType Basic
    AuthName "Svnproject Repository"
    AuthUserFile /etc/subversion/passwd
    Require valid-user
</Location>


标签: svn