You may receive an error similar to the one below stating that SVN cannot negotiate the authentication mechanism during initial installation of Subversion. I received the below error when I was testing a new SVN repository I had set up on a CentOS Linux server and was attempting to checkout the repo from another CentOS Linux server. Below I describe basic configuration and what was done to move pas this error.
Error:
svn: Cannot negotiate authentication mechanism
I figured it had something to do with the server doing the checkout since I was able to svn checkout from another Linux server already. I wanted to make sure that the traffic was encrypted so the configuration was as follows.
SVN Server: svnserver.conf
- [general]
- #anon-access = read
- auth-access = write
- realm = testrealm
- [sasl]
- use-sasl = true
- min-encryption = 128
- max-encryption = 256
As you can see the svnserve.conf is very basic. It only allows authorized access and the authentication is done via SASL with a minimum of 128-Bit encryption.
SVN Server: SASL svn.conf
- pwcheck_method: auxprop
- auxprop_plugin: sasldb
- sasldb_path: /etc/sasldb2
- mech_list: DIGEST-MD5
The above shows that SASL is using MD5 encryption and authenticates against the sasldb2 database located in the /etc directory.
On the Linux client I was attempting to checkout the testrealm repository too I had just installed subversion so I checked to see if any SASL packages had been installed. They had not so I simply installed the cyrus-sasl-md5 package via yum using the below syntax.
Linux Client: Install cyrus-sasl-md5
- yum install cyrus-sasl-md5
This resolved the issue and I was now able to checkout the repository as a foundation for the development storm that was about to begin. So if you get an authentication error make sure that you have verified all of the necessary packages have been installed via yum.
Resolution:
Install cyrus-sasl-md5 on the Linux CentOS client that is issuing the svn checkout command.
Books:
I googled for over an hour before stumbling upon this life saver!
I have commit permission on a public server and have had no problems – on any platform.
On Fedora FC15, I’ve been happily serving an svn repo to my Windows machines on the LAN for cross-platform testing of development work.
Tonight, I needed to pull from a repo served by a Windows Small Business server and was suddenly confronted with
svn: Cannot negotiate authentication mechanism
Again, a real lifesaver!
Thank you.
Hello Barton,
No problem. Thanks for taking the time to leave feedback.
Thanks.
alex
Thanks. You saved me a lot of time. We use SASL at work and I had no idea why a svn wasn’t working on a new box I was setting up.
Hello Sam M.,
Ahh great to hear! Always nice when someone finds one of our articles helpful. We appreciate you taking the time to post feedback.
Thanks.
alex