views:

376

answers:

6

We want to use the same user-id across all our dev tools, but this limitation from subversion is not allowing us to use email addresses as usernames.

A: 

It does allow "." in username, never tried @.

cartman
Is it safe to use "." in username? Since in SourceForge Enterprise Edition and the popular web-based admin tool USVN does NOT allow dots in usernames.
BTW, another popular admin tool, VisualSVN server, does allow dots in username and it works with TortoiseSVN, too...
At work use name.surname usernames for years and it works without a hitch.
cartman
+1  A: 

It really depends on how you set up Subversion. It's possible that the standard Subversion built-in authentication for svnserve does not allow . and @ (I haven't tried). I have set up my Subversion repositories using Apache instead of the built-in svnserve. Under Apache you can use standard Apache access controls like htpasswd files or even integration with LDAP or Microsoft Active Directory. Then you can use e-mail addresses or AD logins for your Subversion users.

Sander Marechal
+1 we use apache with mod_auth_lsspi to authenticate against our windows domain
Wim Coenen
+2  A: 

Well, since you can create groups consisting of multiple users, and later refer to them by using @<groupname>, I guess having a @ in a regular username may be a problem.

This is from the example in the default authz file generated when creating new svn repository:

[groups]
harry_and_sally = harry,sally
[repository:/baz/fuz]
@harry_and_sally = rw

Which gives the users in group harry_and_sally read and write permissions to the repository in /baz/fuz.

oyvindio
A: 

At my $JOB company e-mail address is the standard user name for Subversion, so it must work.

On my team, however, we insisted on being given our (also company-wide) Windows user names which tend to be no longer than 8 characters. User names like [email protected] make for terrible usability in standard GUI log viewers and don't play nicely with svn blame.

bendin
A: 

The usual way to construct URIs containing a username is protocol://user@host:port/path. svn uses this too, so the @ character is special. I haven't tried but I'm rather confident that you could escape it (like %40) to make it work. However, IMO it's a rather bad idea to use complete email addresses as usernames. If you're inside a company, why can't you use the local part? Everything else will most likely be the same for all users, thus you're only repeating information -- and it won't play nicely with log views.

See also RFC 3986.

bluebrother
A: 

Subversion actually uses UTF-8 internally to store all of its data, including the usernames, so there isn't really any restriction on what you can name your users. For example, I just created a commit with the user:

'Й, ק,‎ م, ๗, あ, 叶, 葉, and 말.'

The thing is, other programs may reserve certain characters for special purposes, such as [, =, and # in the svn passwd file. Subversion can handle a wider range of usernames, but that particular file format cannot. If you are finding yourself unable to use certain characters, it is a limitation of some other link in the chain, like Apache or your IDE or your database, or whatever.

That isn't too helpful because you probably can't easily fix whatever is causing this or switch tools, but such is the state of "weird" characters these days.

haxney