Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion on Mac - refuses to get password from keychain

On Mac OS X Leopard - when I try and access a remote repository from Terminal it always asks for: 1. Password 2. Username 3. Password (again)

with the message: "Authentication realm: http://svn.myserver.com:80 Subversion"

I've checked and my credentials are being stored in Keychain and SVN has access to them. Why won't it use them?

like image 691
Andy Baker Avatar asked Mar 19 '09 11:03

Andy Baker


4 Answers

I got this solved by recursively changing the owner of the subversion authentication directory:

sudo chown -R myuser:staff ~/.subversion/auth/

(previous user:group pair was set to root:staff)

You also need to set password-stores = keychain on subversion configuration file:

~/.subversion/config

like image 136
tixastronauta Avatar answered Oct 19 '22 01:10

tixastronauta


By default, svn (and most Unix apps) pass your local username as the username for remote login. I suspect that your account name on the Subversion server is different from your local account name. Thus, authentication fails the first time you enter your Subversion password, and svn, like most Unix apps then asks for the remote username and password and attempts to reauthenticate. You can pass your remote user name using the --username option to svn:

svn --username [remote_username] ...
like image 45
Barry Wark Avatar answered Oct 19 '22 01:10

Barry Wark


I solved this problem by just removing the corresponding authentication file in ~/.subversion/auth/svn.simple (find the right one with with grep as they're named funny). Then after the next svn up in that repository (where svn asked fro username and password) it is now working correctly.

like image 3
user132837 Avatar answered Oct 19 '22 01:10

user132837


I ran into the same problem when running svn commands from an ssh window. Based on some comments above I removed the associated file under ~/.subversion/auth/svn.simple and then ran my svn command from a terminal session directly on the OSX box which made a window pop up asking if I wanted to grant permission for svn to read my keychain. I granted it permission forever and now the svn command in my ssh window works without prompting me for my password.

like image 3
user1498782 Avatar answered Oct 19 '22 00:10

user1498782