When I try to do any svn command and supply the --username
and/or --password
options, it prompts me for my password anyways, and always will attemp
Best I can give you is a "works for me" on SVN 1.5. You may try adding --no-auth-cache
to your svn update
to see if that lets you override more easily.
If you want to permanently switch from user2 to user1, head into ~/.subversion/auth/ on *nix and delete the auth cache file for domain.com (most likely in ~/.subversion/auth/svn.simple/ -- just read through them and you'll find the one you want to drop). While it is possible to update the current auth cache, you have to make sure to update the length tokens as well. Simpler just to get prompted again next time you update.
The problem was that the working copy was checked out via svn+ssh (thanks, Thomas). Instead of setting up ssh keys as was suggested, I just checked out a new working copy using svn://domain.com/path/to/repo rather than svn+ssh://domain.com/path/to/repo. Because this working copy is on the same machine as the repository itself, I'm not really missing out on anything, and I can now use the --password and --username options gratuitously. Seems obvious now that I think about it.
I had a similar problem, I wanted to use a different user name for a svn+ssh repository. In the end, I used svn relocate
(as described in in this answer. In my case, I'm using svn 1.6.11 and did the following:
svn switch --relocate \
svn+ssh://olduser@svnserver/path/to/repo \
svn+ssh://newuser@svnserver/path/to/repo
where svn+ssh://olduser@svnserver/path/to/repo
can be found in the URL:
line output of svn info
command. This command asked me for the password of newuser
.
Note that this change is persistent, i.e. if you want only temporarily switch to the new username with this method, you'll have to issue a similar command again after svn update
etc.
The prompt you're getting doesn't look like Subversion asking you for a password, it looks like ssh asking for a password. So my guess is that you have checked out an svn+ssh:// checkout, not an svn:// or http:// or https:// checkout.
IIRC all the options you're trying only work for the svn/http/https checkouts. Can you run svn info to confirm what kind of repository you are using ?
If you are using ssh, you should set up key-based authentication so that your scripts will work without prompting for a password.
Look to your local svn repo and look into directory .svn . there is file: entries look into them and you'll see lines begins with: svn+ssh://
this is your first configuration maked by svn checkout 'repo_source' or svn co 'repo_source'
if you want to change this, te best way is completly refresh this repository. update/commit what you should for save work. then remove completly directory and last step is create this by svn co/checkout 'URI-for-main-repo' [optionally local directory for store]
you should select connection method to repo file:// svn+ssh:// http:// https:// or other described in documentation.
after that you use svn update/commit as usual.
this topic looks like out of topic. better you go to superuser pages.
Do you actually have the single quotes in your command? I don't think they are necessary. Plus, I think you also need --no-auth-cache
and --non-interactive
Here is what I use (no single quotes)
--non-interactive --no-auth-cache --username XXXX --password YYYY
See the Client Credentials Caching documentation in the svnbook for more information.