SVN commit authentication failure
Note: I have read through the last 150 svn commit error questions and none of the answers solved my problem.
I'm trying to set up a simple svn server from which I can checkout and to which I can commit files.
conf/svnserv.conf
[global]
anon-access = none
auth-access = rw
password-db = passwd
#authz-db = authz
conf/passwd
[users]
myuser = password
svn checkout from another machine works fine:
svn co svn://138.25.25.42:3690 test --username myuser --password password
then I added a local file within my local repository copy
echo "content" > testfile
svn add testfile
but when I now try to commit I get an Authentication/Authorization (ger开发者_运维问答man: Autorisierung) error (all 3 the same)
svn ci --username myuser --password password -m "lala"
svn ci . --username myuser --password password -m "lala"
svn ci test --username myuser --password password -m "lala"
looking at the transmissions with wireshark it looks like my username and password is ignored (?)
[SERVER->CLIENT]
( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries commit-revprops depth log-revprops partial-replay ) ) ) (
[CLIENT->SERVER]
2 ( edit-pipeline svndiff1 absent-entries depth mergeinfo log-revprops ) 25:svn://138.25.25.42:3690 21:SVN/1.6.15 (r1038135) ( ) )
[SERVER->CLIENT]
( success ( ( ANONYMOUS ) 36:ab25c003-0e26-4e93-98a3-6c5d9cc9a979 ) ) ( ANONYMOUS ( 0: ) ) ( success ( ) ) ( success ( 36:ab25c003-0e26-4e93-98a3-6c5d9cc9a979 25:svn://138.25.25.42:3690 ( mergeinfo ) ) )
[CLIENT->SERVER]
( commit ( 4:lala ( ) false ( ( 7:svn:log 4:lala ) ) ) )
[SERVER->CLIENT]
( failure ( ( 170001 0: 62:/build/buildd/subversion-1.6.5dfsg/subversion/svnserve/serve.c 167 ) ) )
Any help getting the commits working would be greatly appreciated.
edit: strangely, an anonymous checkout works as well; so the configuration files seem to be ignored, I just can not see why.
Solved!
The problem was: I have set up the svn server directory in my home directory, and the user under which svnserve ran did not have access to it, regardless of the 777 permissions in the directory (since it had no permissions to access the parent dir).
It seems you've got the wrong token in there for "auth-access". It should be "write" and not "rw". Also, you should probably specify a "realm" in there so users authenticating know for what they are authenticating.
I had a similar issue with subversion (Authentication failed). My solution was I needed to cut all the spaces in config files.
Like above: conf/svnserve.conf should be:
[global]
anon-access=none
auth-access=write
password-db=passwd
#authz-db = authz
conf/passwd should be:
[users]
myuser=password
Of course the access of the svnserve.conf and passwd must be accessabele by the svnserve process.
精彩评论