Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Delete all user repositories from bitbucket (stash)

As contractors come and go, we end up with dead forks in Stash.  That is, forks in user repositories that are never going to be incorporated.  We would like to delete all repositories in the user's personal space.

Our users are configured using LDAP. Once the user is dropped from LDAP, the user is no longer visible in the user's admin page of Stash.  However, we can still go to the users list of repositories via http://stash/users/user_name.

Is there a convenient way to remove all personal repositories for these users?

6 answers

There isn't a convenient way -  at least no way I know.

As a central git-server is generally used as a long-time archive, there even shouldn't be a convenient way IMHO to do mass destruction operations (which might be easily done by incident ...)

You might achieve your goal using the REST API.This needs a little scripting, but should be easy enough though.

 

@Johannes Kilian Thank you very much.

This is a life saver.

I just wanted to point out, how "freeing licenses when using LDAP" works ...- I was aware that was not part of @michael_giroux's question - therefore I added it as a comment - and not as an answer wink

Tim Crall: Thanks - wasn't aware of this. My insights have been a result of discussion on https://answers.atlassian.com/questions/195495 As I don't have access on our ActiveDirectory contents, the dynamic "Separate Group" solution is not a way to go for me yet sad

 

yeah, I know licenses weren't your issue, but Johannes's aside about deleting accounts from LDAP being the only way to retrieve licenses seemed odd to me.

The license is not the issue.  Some of these folks forked several repos, and/or created their own repositories.  We want to every repository created by a contractor once they are removed from LDAP.

 

Johannes Kilian has proposed a nice solution using the Rest API.  We will look into that.

We have our server configured so that only members of a particular AD group can login to Stash, and removing them from that group frees up the license.

@michael_giroux: "Once the user is dropped from LDAP, the user is no longer visible in the user's admin page of Stash"

Just for information: This is the only way to free the Bitbucket-licenses of LDAP users. Each LDAP user is able to login into Bitbucket server. As soon as the LDAP user initially logs in, he eats up one license out of your license pool. Bitbucket does not offer a possibility to remove the user from the license pool again to free the license (as can be done with Internal Bitbucket Users). The only way to free licenses of LDAP users is removing them from LDAP - after this Bitbucket automatically should free the users license.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,740 views 10 16
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you