第一种方法:
To use alternate credentials for a single operation, use the --username and --password switches for svn.
To clear previously-saved credentials, delete ~/.subversion/auth. You'll be prompted for credentials the next time they're needed.
These settings are saved in the user's home directory, so if you're using a shared account on "this laptop", be careful - if you allow the client to save your credentials, someone can impersonate you. The first option I provided is the better way to go in this case. At least until you stop using shared accounts on computers, which you shouldn't be doing.
To change credentials you need to do:
rm -rf ~/.subversion/authsvn up( it'll ask you for new username & password )
since your local username on your laptop frequently does not match the server's username, you can set this in the ~/.subversion/servers file
Add the server to the [groups] section with a name, then add a section with that name and provide a username.
for example, for a login like me@svn.example.com this is what your config would look like:
[groups]
exampleserver = svn.example.com
[exampleserver]
username = me最好是2种方法结合尝试一下。
评论
发表评论