Force users to use their Active Directory username

Hi!

I'm currently evaluating Stash for our company because we want to try git and I heard a lot of good things about Stash. We are currently using SVN for a couple web projects but we are not 100 percent lucky with it because there are some things which would definitely work better with git.

After a few hours working with git and Stash it looks like it would work pretty well for us. There's one thing I don't understand though. This might not be a problem specific with Stash but with git in general. I configured Stash to sync with our Active Directory and as soon as I want to push or pull from a repository I have to enter my AD credentials. That works great. After pulling a repository from Stash I can make each commit with a different username and email address. After pushing this repository back to Stash, all these usernames are shown up in the log. Now I'm wondering if there's any change to force all users using their own Active Directory username?

Thanks for your help!

1 answer

1 accepted

Hi Yves,

You've discovered one of the tradeoffs with Git and DVCS in general.

Depending on how you are using Git this restricting pushes may not work quite how you expect. If you're making single commits and pushing to Stash then everything will be fine. However, if hyptothetically someone pulls from another author (from a fork say), and then decides to push they will be denied. The only option at that point is to get the other person to push first or rewrite history (neither of which is ideal). It's complicated...

All that said, you might be interested in the following plugin. :)

https://marketplace.atlassian.com/plugins/com.risingoak.stash.plugins.stash-enforce-author-hook

The other option would be to require users have a pre-commit hook localy, but that comes with it's own set of problems (ie you can bypass it fairly easily).

I hope that answers your question?

Charles

Hi Charles,

Thanks for your answer. That's what I expected and it makes totally sense to me. I'll check out the plugin.

Yves

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

176 views 20 8
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you