I'm new to stash and git, and I'm likely doing something wrong here.
This has to do with Stash using Git's user.name instead of the Stash username.
a) I created two users in Stash (user1 and user2)
b) I checkout, in two different directories;
git clone http://user1:password@localhost:7990/scm/pick/pickertool.git
git clone http://user2:password@localhost:7990/scm/pick/pickertool.git
(note the user:password format)
c) However, if I set both of the local GIT repostories' user.name to "User" then I see the commits (in stash) as "User" (instead of user1 or user2).
Is this how its supposed to work? Am I doing something wrong?
In this situation, user1 can set their user.name to "user2" and make mask their commits.
Thanks,
Dave
Hi David,
So if you look at your commits (ie git log) you'll see the user and email address of what is set locally. As you point out user2 can absolutely "fake" the user details if they so desire. It's important to note that Stash doesn't (yet) map the Git email/author names to anything in Stash, it might appear like we are because we're using Gravatar, but that's it. This is certainly something we will implement and you may be interested in voting on the following:
https://jira.atlassian.com/browse/STASH-3235
But that doesn't address the problem of impersonation, something that is much harder to solve. You may be interested in this:
https://jira.atlassian.com/browse/STASH-2642
There is a plugin mentioned on that ticket that enforces that when you push all the commits much contain an email address that matches the user who is pushing. I need to warn you that this works in simple workflows, but if you ever start forking with feature branches involving multiple people you will eventually run into the situation where you can't push because you be trying to push someone else's commits, and there is nothing you will be able to do. Enforcing security in a DVCS (distributed) world is tricky.
Does that help?
Charles
Hi, Charles,
That explains what's happening - thanks for for the reply and the links (I voted both issues).
Cheers,
Dave
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.