youngmon/atlassian-qna huggingface dataset:
With Bitbucket Cloud Migration Assistant, will invitation mails be sent out?
Asked by Joachim Bollen:

Hi,

I've been searching the documentation regarding the Bitbucket Cloud Migration Assistant, but I wasn't able to find the answer to this question:

Will the migrated active users automatically get an invitation email to Bitbucket cloud? Or does the administrator need to send these invites manually, and so trigger that at the time the migration is completed and validated?


Answers:
author: seanaty
body: Unless the behavior changed since the a last time I came across this, invitation emails are not sent ever. The onus is on the admin to email their users and instruct them to go through a password reset flow.

comments: author: Joachim Bollen
body: I tested it, and that's correct. Do take note that emails will be sent if you grant admin access to repositories, so make sure to send the invite mails prior to that, so people know what's happening.


Tags: bitbucket-cloud

cloud

cloud-migration
Scriptrunner for bitbucket (pre hook)
Asked by Nike:

Is it possible to check the code for patterns using scriptrunner?


Answers:
author: Robert Giddings [Adaptavist]
body: Hi [@Nike](/t5/user/viewprofilepage/user-id/4667159) ,

Yes, we are looking into providing some examples, on how to do this. Which should be available some time in the New Year.

Do you have a particular use case in mind, you would like us to consider in our examples?

Kind regards,

Robert Giddings,

Product Manager, ScriptRunner for Bitbucket

comments: author: Robert Giddings [Adaptavist]
body: Hi [@Nike](/t5/user/viewprofilepage/user-id/4667159) ,

Further to my previous answer, we have now published a Script to our Adaptavist Library that shows an example of blocking commits based on file content.

The Script can be found here: <https://library.adaptavist.com/entity/block-commits-for-files-containing-content-that-doesnt-match-regex>

Kind regards,

Robert Giddings,

Product Manager,

ScriptRunner for Bitbucket


Tags: bitbucket-server

pre-receive-hook

scriptrunner

server
Redeploy last successful Deployment via API
Asked by Firdaus Aga:

Hi Team,

I've gone through the API reference but can't find the info for the following -  
How to filter to find only the last successful deployment.  
How to redeploy the last successful deployment.

Use case -  
We're trying to create a shell script that reverts to the last successful deployment in case of failure on certain http error codes.


Answers:
author: Theodora Boudale
body: Hi [@Firdaus Aga](/t5/user/viewprofilepage/user-id/4662041),

I'm afraid that filtering does not work with pipelines API endpoint. You may be able to filter the results using another tool that filters JSON data, like jq, and then use the following API endpoint to trigger a pipelines build:

* <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-post>

We have a feature request for the ability to filter the results in pipelines API endpoint:

* <https://jira.atlassian.com/browse/BCLOUD-14000>

We also have another feature request for the ability to automatically re-deploy the last successful build:

* <https://jira.atlassian.com/browse/BCLOUD-20120>

If you'd be interested in any of these features, I would suggest adding your vote there (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature requests.

Kind regards,  
Theodora

comments: author: Firdaus Aga
body: [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) I've added my vote, thanks a ton!  
I'll try something with jq as you've suggested.


author: Theodora Boudale
body: Hi [@Firdaus Aga](/t5/user/viewprofilepage/user-id/4662041),

You are very welcome, please feel free to reach out if you have any other questions!

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Custom pipeline still throws an error about no manual steps in first step of pipeline.
Asked by Firdaus Aga:

I have a strange issue with my pipeline script.  
I've configured a number of custom pipelines, however when I try to run some of them I get an error about "First step in pipeline cannot be manual"

Please advise.


Answers:
author: Theodora Boudale
body: Hi [@Firdaus Aga](/t5/user/viewprofilepage/user-id/4662041),

Based on the error message, it sounds like the ++first step++ of these custom pipelines may have **trigger: manual**in their definition in the yml file.

Could you please double-check and confirm if this is the case? If so, you will need to remove this from the first step in order for the pipeline to run. Is there a reason why you need the first step of a custom pipeline as manual or is it accidental? (Custom pipelines will run when you trigger them, and not automatically on every push)

If you feel comfortable sharing your yml file here, I can also double-check the reason for the error (you can remove the commands of the scripts and any names prior to sharing, just the structure of the yml file with the keywords used should be enough).

Kind regards,  
Theodora

comments: author: Firdaus Aga
body: Hi Theodora,  

That's absolutely right, I actually have single step pipelines which ssh an Ansible server to run builds.

Since we're in a production environment we need to trigger these manually.

I wasn't aware of this point -  
Is there a reason why you need the first step of a custom pipeline as manual or is it accidental? (Custom pipelines will run when you trigger them, and not automatically on every push).

Just to be clear however does this mean that I need not put trigger: manual for any steps in the custom pipelines?


author: Firdaus Aga
body: [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) I removed trigger: manual from the pipeline and it worked.

Thanks for the clarification!!


Tags: bitbucket-cloud

cloud
Not getting invitation mail
Asked by YoonSeo Kim:

Hi.

My team manager try to invite me to a repository.

But I couldn't get invitation email never.

I checked spam mail box as well.

But no mails get arrived from bitbucket.org.  

Please help me to solve this problem.

Sincerely,

Yoonseo Kim.


Answers:
author: Theodora Boudale
body: Hi [@YoonSeo Kim](/t5/user/viewprofilepage/user-id/4681579),

I checked in our system and saw a hard bounce event for your email that was created a few months ago, with the error message:

```
550: 550-5.2.1 The email account that you tried to reach is disabled.
```

Atlassian attempted to send an email to your email address back then and received a hard bounce response from your mail server. The hard bounce informs us that the email does not exist and in this case, it is placed in a suppression list, as we no longer try to resend to non-existing emails.

I went ahead and removed your email from the suppression list, could you please ask your team manager to resend the invitation now?

A new invitation needs to be sent, as the previous ones were dropped.

Please feel free to let me know if things are ok now and if you need anything further.

Kind regards,  
Theodora

comments: author: YoonSeo Kim
body: Thanks! I solved my problem.


Tags: bitbucket-cloud

cloud
What is maximum memory that is available for bitbucket user in free plan? (I mean total size of all
Asked by Tornike Shavishvili:

Hello

I have made extensive search on internet, read documentation of bitbucket, but i can not find definitive answer of following questions:  

1. What are maximum numbers of private repositories of free plan (is it unlimited?)  
2. What is maximum size of each repository? (is it 1GB or something else?)  
3. What is maximum memory that is available for bitbucket user in free plan? (I mean total size of all repositories together? does this have a limit?  

Thank you


Answers:
author: Theodora Boudale
body: Hi [@Tornike Shavishvili](/t5/user/viewprofilepage/user-id/4681347) and welcome to the community!

Please find below the answers to your questions:  

> 1. What are maximum numbers of private repositories of free plan (is it unlimited?)

There is a limit of 300 repositories in total for workspaces on the free plan.  
There is also an additional limit on the number of new repos that can be created on a single day for free workspaces, which is 30 per day.

Please note though that the support team can override these limits when they are reached.  
We have these limits in place to help prevent spam in Bitbucket Cloud.  
However, if you reach any of these limits for a free workspace you are an admin of and you need to create more than 30 repos/day or more than 300 in total, you can raise a request here and we can exempt your workspace from that limit.

> 2. What is maximum size of each repository? (is it 1GB or something else?)

The repository limit for free repositories is 2 GB, however, at this time, we are not enforcing this limitation and the actual limit is 4 GB (same as on paid plans). Please note that both enforcement of the limit and the limit itself are subject to change in the future.

> 3. What is maximum memory that is available for bitbucket user in free plan? (I mean total size of all repositories together? does this have a limit?

There is no limit on the total space consumed by all repositories in a workspace (either free or paid).

<br />

If you have any other questions, please feel free to let me know.

Kind regards,  
Theodora

comments: author: Tornike Shavishvili
body: [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) Thank you for response.   

Just one more questions: How many workspaces can free user have on bitbucket? What are limitations?  

Thank you


author: Theodora Boudale
body: Hi [@Tornike Shavishvili](/t5/user/viewprofilepage/user-id/4681347),

There is no limit on the number of workspaces you can create or be a member of, either free or paid.

You are very welcome, and please feel free to let me know if you have any other questions!

Kind regards,  
Theodora


author: Tornike Shavishvili
body: [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) Thank you!

Given resources should more than enough!

Kind Regards  
Tornike


Tags: bitbucket-cloud

cloud
Script for capturing file and folder count in Bitbucket repository
Asked by Sanket Sutar:

Hello all. I need small help from you guys. I am working on migration project. I have to validate migration so I need script to capture number of folder and file count in Bitbucket repository....


Answers:
author: Marcin
body: Hi [@Sanket Sutar](/t5/user/viewprofilepage/user-id/4668432) ,

You can use rest api as initial step.

<https://bitbucket-url/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/files>


author: Vishwas
body: Hi [@Sanket Sutar](/t5/user/viewprofilepage/user-id/4668432)

Please check out this script here <https://confluence.atlassian.com/stashkb/how-to-count-the-number-of-files-in-a-repository-folder-407725142.html>

Regards,

Vishwas

comments: author: Sanket Sutar
body: After storing file in the folder how to see the output.


author: Vishal Biyani
body: [@Sanket Sutar](/t5/user/viewprofilepage/user-id/4668432) Vishwas has shared a Unix script with you.

if you are on Unix/Linux system, you can use cat \<filename\> to see the output.


Tags: migration
How to search for an IP address
Asked by cv_dbush:

How do you search for an IP address in all of your repos in Bitbucket Cloud? Searching for 10.100 or "10.100" does not work, it returns nothing.


Answers:
author: Nic Brough -Adaptavist-
body: What data exactly are you searching for this address?

comments: author: cv_dbush
body: I am looking for IP addresses in the code. I want to search all of my repositories. For example, find all instances of 10.100.1.1.


Tags: bitbucket-cloud

cloud
I can not login to my Bit Bucket Master Account. Not getting Reset Password Email.
Asked by Shoaib Shoukat:

It's been 2 days I can no longer access my Bit Bucket Account. I have tried many times to reset my password but unfortunately not receiving any emails from Bit Bucket. I don't know why my password stopped working automatically and now I can not reset it. Please help asap.

The email of my account is \<email_removed\> that I can not access.

I have been paying this from my credit card if any billing details or payment information required to verify.

Looking forward for the help.

Thanks


Answers:
author: Theodora Boudale
body: Hi [@Shoaib Shoukat](/t5/user/viewprofilepage/user-id/4680833),

I can see that you have created a support ticket and the issue has been resolved there.

Just a heads up, I removed the email from your community post to protect your privacy.

If you need anything further, please feel free to let us know.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Please log me out of all active sessions with bitbucket - may be interfering with logon
Asked by ucas_johnt:

Please log me out of all active sessions with bitbucket - I can see there is one live since 6 Dec at <https://bitbucket.org/account/settings/security/sessions>

This is potentially a security risk??


Answers:
author: Charlie Misonne
body: Hi!

Please be aware of the fact that this is not Atlassian Support. Community members are not able to end your Bitbucket sessions. Unless someone from Atlassian stumbles upon your question you will have to create a ticket on <https://support.atlassian.com> to ask them to stop your sessions.

There is a [feature request](https://jira.atlassian.com/browse/BCLOUD-15393) for this. It has been closed as duplicate but I don't see a link to the double.


Tags: bitbucket-cloud

cloud
How to export the list of Projects along with Repos in Bitbucket cloud
Asked by Prabhu Chilukuri:

Hi All,

Is there a way to export the list of projects along with repositories in Bitbucket Cloud?

Thanks,


Answers:
author: Karthick S
body: Hello [@Prabhu Chilukuri](/t5/user/viewprofilepage/user-id/3414934)  

Thank you for reaching out to Atlassian Community!   

In Bitbucket Cloud, you may have to use [this REST API to get the list of projects in a workspace](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-projects-get)

To get the list of repositories, you may have to use [this REST API to get list of repositories in a workspace](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-get) This returns the project key as well.

Let us know if you have any queries.

Kind regards,

Karthick S


author: Vishwas
body: Hi [@Prabhu Chilukuri](/t5/user/viewprofilepage/user-id/3414934)

Via REST API of bitbucket we can get the list of repos.

I did find this link which has python script to get the list of all repositories <https://www.middlewareinventory.com/blog/bitbucket-list-repositories/>

Maybe with few modifications you can make it work according to your use case.

Regards,

Vishwas


Tags: bitbucket-cloud

cloud
How to delete branches that are 1month old in a Bitbucket Repo?
Asked by manoj reddy gajjala:

Hi All,

Is there a way that we can delete old Bitbucket branches(1month old) in bulk for a particular repo?

Please guide.

Thanks!!

Manoj


Answers:
author: Vishwas
body: Hi [@manoj reddy gajjala](/t5/user/viewprofilepage/user-id/3570785)

We can do this via git command line by writing a script to find out old branches and delete them.

To do this you may have to mirror clone the entire repo to local machine, run the script and push mirror back to bitbucket.

Please check this link they have mentioned the command snippet to remove branches that are 1 week old. You can change the script according to your use case and test it.

<https://stackoverflow.com/questions/10325599/delete-all-branches-that-are-more-than-x-days-weeks-old/49998249>

Regards,

Vishwas


Tags: bitbucket-server

server
How to set to log in to the bit bucket only on one designated PC?
Asked by jhb:

The ip limit is not suitable because it can be connected from multiple PCs of the same ip.  
Like mac address, how do you log in and access only one designated pc?


Answers:
author: Nic Brough -Adaptavist-
body: This isn't really a Bitbucket question, you'd need to set up your networking so that the target machine has a known, static and unique IP address (so it's not behind a NAT service and so-on). Then you'd be able to whitelist only that machine.
Bitbucket Server backup client takes a long time to run (8 hours) after changing home directory
Asked by Edward Ryan:

I have been using the Bitbucket Server backup client for a few years. Backups used to take an hour. We needed to expand and move data to a NetApp mount in a different location. The first backup after the move was still running when business began so I stopped it.

I let it run twice on the weekend thinking it would catch up after the first time but the second time took 10 hours. Should I delete all the backup files to get it to "reset"?


Answers:
author: Nic Brough -Adaptavist-
body: This sounds like you've moved your backups to a much slower file system, and the best place to look would be getting a faster file system.

I'd like to confirm what you mean by "Bitbucket Server backup client", but if it is what I guess it is, then no, deleting old backups won't have any effect, the backups are not incremental or staged, they're a simple one-off dump of everything.

comments: author: Edward Ryan
body: It's weird because the old daily logs look like they're only scanning repositories that changed that day. Then after the move and update to the new home directory, the next log shows it is scanning all repositories. The log after that scans all repositories again.

This is the client <https://confluence.atlassian.com/bitbucketserver/bitbucket-server-backup-client-776640064.html>.

But now that we moved to NetApp, we're using hourly snapshots. We tested restoring to a snapshot and database backup. With that, I was able to convince my manager that these nightly backups with the client are not needed anymore.


Tags: bitbucket-server

server
How to default PR's to forked repo instead of original source repo?
Asked by Mark Nelissen:

We have some repositories, that are just slight variations on a previous done work. As such, we created them by forking the repository that has similar code that will be used as a starting point. However, since it is a fork, each time in the new repo we open a PR, by default it will do it towards the original repository, instead of remaining inside the repo.

The fork was basically only intended to create a copy, there is no point in keeping them linked or even in sync. The two repositories, old and new, should be able to behave independently from each other.

However, I find no option to sever the link between the both repositories, nor do I find a setting that allows me to select the preferred target for the PR, so I can put it to the current repository.


Answers:
author: Theodora Boudale
body: Hi [@Mark Nelissen](/t5/user/viewprofilepage/user-id/1539055),

I'm afraid that it is not possible for Bitbucket users/admins to do that, however it is possible for the support team to remove the fork relationship between two repositories.

* If you feel comfortable sharing the names of the repos (masked, with some asterisks in the name, if you don't want to share their full name publicly), I can do this.
* Alternatively, since you're a member of a workspace on a paid plan, you can create a ticket with the support team and ask them to remove the fork relationship for certain repos.   
  The ticket will be visible only to you and Atlassian staff, so you can share the repo URLs there. The ticket can be opened via <https://support.atlassian.com/contact/#/>, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product.
* I can also create the support ticket for you if you prefer that, please let me know.

We have a feature request to allow admins to remove the fork relationship between two repositories:

* <https://jira.atlassian.com/browse/BCLOUD-13645>

You can add your vote in that feature request (by selecting the **Vote for this issue** link) and add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

If you have any questions, please feel free to let me know.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Do I need to install GIT with sourcetree
Asked by Gyro Scopic:

Hi

I have and am using sourcetree for windows7

I just loaded roots theme for WP and used 'npm install' but it fails saying git is not installed.

Do I need to install GIT seperately as well as sourcetree??

If not, where is the path to git?


Answers:
author: Gyro Scopic
body: Thanks Guys

Fixed it myself by installing git from here... <http://git-scm.com/download/win>


author: Bal?zs Szakm?ry
body: In Tools/Options/Git you can choose whether you want to use embedded or system Git. If you want to use the embedded one, you can download it from there, if you want to use msysgit, you can get it [here](http://git-scm.com/download/win).


author: Julia Levcovets
body: Hi Gyro,

must say there is no need to install - use embedded!

Regards


author: dan_wellman
body: You should probably use system version, and keep it up to date. Latest contains up to date security patches, etc.


Tags: npm

root
Where can i give the branch permissions to the specific developer using Source Tree? Is there a way to provide branch permissions using source tree?
Asked by Bhuvan Kota:

Where can i give the branch permissions to the specific developer using Source Tree? Is there a way to provide branch permissions using source tree?


Answers:
author: Bal?zs Szakm?ry
body: You can only do this on the Stash web interface (Settings of the repository -\> Permissions/Branch)
Push to multiple Remotes with Sourcetree)
Asked by Alfred Bez:

Is it possible to push to multiple / all Remotes with Sourcetree?

I've tried to configure my config file (see: [](http://stackoverflow.com/a/3195446/2123108),)<http://stackoverflow.com/a/3195446/2123108>), but it isn't working...


Answers:
author: l
body: You can totally push to multiple repositories in one click !

Repository -\> Repository setup -\> Edit remote config file (it will open up the file in your text editor)

Put all your remotes in a single origin remote section, see below for example :

\[remote "origin"\]  
url = [https://myaccout@bitbucket.org/mynickname/](https://sforzando@bitbucket.org/sforzando/rig-client)myrepo  
url = myuser[@192.168.1.61](mailto:omicen@192.168.1.61):/srv/git/myrepo.git  
fetch = +refs/heads/\*:refs/remotes/origin/\*  
pushurl = [https://myaccout@bitbucket.org/mynickname/](https://sforzando@bitbucket.org/sforzando/rig-client)myrepo  
pushurl = myuser[@192.168.1.61](mailto:omicen@192.168.1.61):/srv/git/myrepo.git

Done.

It remains a little bit hacky because Sourcetree only shows one of remote on its UI, but since this is an unsual usecase and Sourcetree does give you the ability to edit the config file it's ok.

comments: author: Tim Titus
body: Thank you! This worked perfectly for me


author: Bal?zs Szakm?ry
body: It seems that if you have multiple remotes, you can only push to one of them at a time. (Top-left dropdown in the Push dialog only lets you select one, and the address bar next to it shows only one address.)