Is there a way to have svn automatically detect your credentials (say by reading a .file in your home directory)?
I have a bash script that includes some svn commands, and I want it to automagically run as the user who is running the script. If I put one user’s credentials inside the script then it is easier to run (runs easily without questions) but then we don’t know who did what?
Well, the environment variables in your shell usually provide a USER or UID variable. USER is the current user’s username, and UID is the current user’s numeric user id. For example: ‘echo $USER’
alternatively you could use the ‘id’ program, like so: ‘id -nu’
I don’t think svn can automatically detect the current user’s name, but since you’re using a bash script you can just supply the name yourself, e.g.: ‘svn –username $USER ‘