stash user name and git config user name with stash API

Hi All,

I created two users(user1,user2) with admin. I created repository and shared it to two users.

Now I cloned for user1 and user2 seperately(with seperate folders).

for user1:

in this repository I changed something and pushed to server. I got to know that it pushed with

So, I ran the below commands in git

git config "user1"

git config "".

similarly I did for user2:

But how to get the user1 email with stash API.??


Anil Kumar

3 answers

1 accepted

I tried but not able to implement Person properly with Stash User.

So I found the solution which worked for me in this.



Person (and StashUser, which inherits it) has a getEmailAddress method.


with local machine If I did with this

1) $git config ""

In this case how can I get the git configured email with stash API.

Thanks in advance


Changeset.getAuthor().getEmailAddress() gets you the mail address that was given by the user at the time of pushing.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

692 views 0 4
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot