Mapping git users to Teamcity users was already a little bit confusing, but even once you get that working, its even harder to figure out how to map those uses into youtrack users, for the purpose of executing youtrack commands from git comments.
The biggest problem seems to be this: developer's get to configure their git user.name and user.email properties how ever they want. Many of them screw it up. But Teamcity gives you a fair amount of freedom mapping those user names into Teamcity IDs. So you can work around what the developers did.
When I read the youtrack documentation, it said "User accounts taken from TeamCity are compared to user accounts in YouTrack by provided e-mail address." Great, I thought. I guess it maps the git user to a TeamCity user, then takes the TeamCity user's configured email address and compares it to the YouTrack user's email address.
No luck. The "User (TeamCity User)" column in YouTrack's TeamCity Changes tab is just showing whatever raw VCS user name was extracted from the git commit, which is configurable in TeamCity, and can either be the user.name, the user.email, user.name <user.email>, or finally, the id portion of the user.name (like from firstname.lastname@example.org, it would extract bobbarker).
Since the extracted user info apparently has to match YouTrack's user id, then I guess I need to reconfigure Teamcity to extract the user.email from git commits, and make sure everyone has configured their user.email property correctly.
Also, when a command fails like this, youtrack sends the admin an email message indicating that a command failed and the reason, which is nice. But in this case, the reason is misleading. It says "A VCS user bbarker had tried to apply command from VCS commit to issue
proj-234 User could not be found in TeamCity ." That makes you think "I guess the git user couldn't be mapped to a TeamCity user", but that's not the case. I can see in TeamCity that it has recognized that commit as mine, which means it did map it to my TeamCity user account. I think the message really means "User could not be found in YouTrack (and btw, it should match the email address)"
It would help to better document the way it currently works, but I think it would work better if it simply mapped the TeamCity user name (not the id information extracted from the git commit) to the youtrack username. Or in youtrack, allow me to configure a VCS or TeamCity user id for each YouTrack id so I can configure that mapping, similar to how TeamCity works.