youngmon/atlassian-qna huggingface dataset:
Repo size under Repository Details does not match the size of the .git directory
Asked by Neethu Bal Mallya:

The repo size under Repository Details does not match the size of the .git directory. I have removed the large files from the history. Can you help resolve this?   

The repository is: [https://bitbucket.org/neethubal/pr\*_inf\*](https://bitbucket.org/neethubal/pr*_inf*)


Answers:
author: Syahrul
body: Hey [@Neethu Bal Mallya](/t5/user/viewprofilepage/user-id/5316321)

Welcome to the community.

I have triggered GIt GC on the affected repository, which has reduced the size to 1.4 GB.

Can you review this and let me know how it goes?

Regards,  
Syahrul

comments: author: Neethu Bal Mallya
body: Hi Syahrul,

Yes, the repo size is now as expected. Thank you so much!

\~Neethu.


Tags: bitbucket-cloud

cloud
How to create personal repository in Bitbucket?
Asked by faizan:

I am new to Bitbucket but seems like i am not really liking it's confusing UI. I just want to create a personal repository in my account and i am on it from hours i also checked the official docs but they have tutorials with old UI and nothing matches of my account UI with it. Whenever i want to create a repository, i am forced to create a workspace then project and then repository. I want to deploy a little app on vercel but then vercel requires me to make a team and i dont want to. I just want to make a persoanl repo like on Github and deploy it on Vercel's hobby plan.


Answers:
author: Ash Yadav
body: Hi [@faizan](/t5/user/viewprofilepage/user-id/5316297) welcome to the Atlassian Community!

A repository needs to belong to a project, which also needs to belong to a workspace.

You only need to do this once if you're just working on personal projects.

Kind Regards,

Ash

comments: author: faizan
body: Hi [@Ash Yadav](/t5/user/viewprofilepage/user-id/5167607) thanks for your time,  
That's ok if repo needs to blong to project and workspace but the real question is how can i make a persoanl repository? when i import it in vercel it gives me this error: "The repository "my-private-workspace/my-project" is owned by a workspace. Please link it to a Vercel team instead."  
How do i resolve this error? It doesn't matter to me if a repository belongs to a project inside a workspace or whatever. I just want a personal repository which doesn't seem to be owned by an organization or collaboration.


author: Theodora Boudale
body: Hi [@faizan](/t5/user/viewprofilepage/user-id/5316297),

I'm not sure what is your definition of 'personal repository'. In Bitbucket Cloud, repositories do not belong to accounts (e.g. to your personal account) but to workspaces.

You can create a Bitbucket Cloud workspace, then a project, and then create your repo there. You don't have to invite anyone else to this workspace and repo.

With regards to the error you get when you try to import the repo in vercel, I would suggest asking for assistance from the vercel support team or a vercel-specific forum. The error comes from vercel and I'm not sure how this product works and how to resolve the error.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

repository
How I can I remove the users from workspace if the admin of the account accidentally removed himself
Asked by Sarwo Edi Wibowo:

Hello,

Recently we are trying to remove users from the workspace since free plan is limited to 5 users only, but the admin of the account accidentally remove himself from the workspace and he is the only user who has admin access from all members, is there any workaround or solution for this?

Thank You


Answers:
author: Patrik S
body: Hello [@Sarwo Edi Wibowo](/t5/user/viewprofilepage/user-id/5313036) and welcome to Community!

Bitbucket will not allow the last Admin of the workspace to remove its own access. When the last Admin tries to remove itself, Bitbucket will show an error message and will not proceed with the removal.

Checking the workspaces you have access to, I see there's still one user under the **Administrators** group. Unfortunately, we are not able to share private information such as name/email address here on Community, but you can check with your colleagues/team for them to try accessing the workspace and check if they are not the remaining Admin.

Thank you, [@Sarwo Edi Wibowo](/t5/user/viewprofilepage/user-id/5313036) !

Patrik S


Tags: bitbucket-cloud

cloud
Importing a pipeline as step
Asked by Ananth Sarathy:

I would like to be able import a pipeline as a step  

<br />

the custom import below works, but I would like the ability to add the imported pipeline as a step.

```
pipelines:
  custom:
    import-pipeline:
      import: build-tools:initial-commit:share-pipeline-1

  default:
    - parallel:
        fail-fast: true
        steps:
          - step: *mavenBuild
          - step:
              import: build-tools:initial-commit:share-pipeline-1
          - step:
```


Answers:
author: Caterina Curti
body: Hi [@Ananth Sarathy](/t5/user/viewprofilepage/user-id/5180994) ,

With the release of [Dynamic Pipelines](https://bitbucket.org/blog/introducing-dynamic-pipelines-a-new-standard-in-ci-cd-flexibility) you can now achieve a greater level of flexibility with the Bitbucket pipelines.

I just published [this article](https://community.atlassian.com/t5/Forge-for-Bitbucket-Cloud/Share-a-step-across-pipelines-Dynamic-Pipelines/ba-p/2712403) explaining how to add a step dynamically to a repository. You'll also see that there is a greater level of flexibility with what can be achieved considering that, the app logic, can change the entire pipeline of a repository.  

Hope this helps,  
Caterina


author: Patrik S
body: Hey [@Ananth Sarathy](/t5/user/viewprofilepage/user-id/5180994) and welcome to the Community!

Currently, the shared pipelines feature only allows you to export/import the entire pipeline definition between repositories. I'm afraid it's not possible to import a single step or import the pipeline as a step (see [Share Pipelines Configuration FAQ \| Bitbucket Cloud](https://support.atlassian.com/bitbucket-cloud/docs/share-pipelines-configurations/#FAQ)).

We have a feature request opened to improve the capabilities of shared pipelines, which includes the possibility to share individual steps of a pipeline between repositories :

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

We encourage you to Vote for that feature so it gets more visibility and helps our developers understand the interest. Also, you have the option to set yourself as a **Watcher** so you will be notified whenever there's any progress on that feature. New features are implemented based on [this policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html).

Thank you, [@Ananth Sarathy](/t5/user/viewprofilepage/user-id/5180994) !

Patrik S


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Error getting caches of one step to another
Asked by Dipendra Chaudhary:

I want to get \`.terraform\` directory as a cache in the next step so that I can run driftctl command. Here is my bitbucket-pipeline.yml

\`\`\`  
definitions:  
caches:  
terraform: .terraform

pipelines:  
branches:  
Dev:

- step:  
name: Dev - Validate  
caches:  
- terraform  
script:  
- export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_DEV  
- export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_DEV  
- export AWS_REGION=$AWS_REGION_DEV  
- cp env/dev/backend.tf backend.tf  
- terraform init  
- terraform validate

- step:  
name: Dev - Driftctl Scan  
image: cloudskiff/driftctl  
script:  
- export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_DEV  
- export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_DEV  
- export AWS_REGION=$AWS_REGION_DEV  
- cd .terraform  
- driftctl scan --from tfstate+s3://dev-tfstate/Terraform/terraform.tfstate  
\`\`\`  
Since the previous step use different image, seems the it is not getting the cache. Here is the error I'm getting in second step:  
\`\`\`  
cd .terraform  
/opt/atlassian/pipelines/agent/tmp/shellScript449014055886284312.sh: cd: line 13: can't cd to .terraform: No such file or directory  
```````````


Answers:
author: Patrik S
body: Hello [@Dipendra Chaudhary](/t5/user/viewprofilepage/user-id/5315895) and welcome to the Community!

For a previously generated cache to be used by a step, you need to configure the step to do so by including the **cache**section, as you did in the first step:

```
 - step:
          name: Step name
          caches:
            - <cache name>
         <rest of step definition>
```

This will need to be included in every step where you want to use cache. I see your second step does not have the cache section so this is the reason why it's not being used.

Also, if your end goal is to pass files from one step to another, I would recommend using [pipelines artifacts](https://support.atlassian.com/bitbucket-cloud/docs/use-artifacts-in-steps/) instead, because caches will only be automatically refreshed after 7 days.

When you define a file/folder as an artifact in a given step, the artifact will be available in each future step and downloaded by default. Following is an example of defining the terraform folder as an artifact, and listing its content in the next step :

```
pipelines:
  default:
      - step:
          script:
            - mkdir .terraform
            - touch .terraform/fileA.txt
            - ls -la
          artifacts: 
            - .terraform/** #include all files and subfolder
      - step:
          script:
            - cd .terraform
            - ls -la
```

Hope that helps! Let me know in case you have any questions.

Thank you, [@Dipendra Chaudhary](/t5/user/viewprofilepage/user-id/5315895) !

Patrik S


Tags: bitbucket-cloud

cloud
i am getting stuck at only this step my pipeline is running but it is not going for next step in my
Asked by Siddhant Pandey:

i am getting stuck at only this step my pipeline is running but it is not going for next step in my pipeline how can i run them in non interactive mode.  

image: python:3.10

pipelines:  
default:  
- step:  
name: Building  
script:  
- apt-get update \&\& apt-get install -y zip  
- pip install virtualenv  
- virtualenv venv  
- source venv/bin/activate  
- pip install -r requirements.txt  
- python main.py  
- step:  
name: Deploying the app  
deployment: Production  
script:  
- pipe: atlassian/rsync-deploy:0.9.0  
variables:  
USER: $DEPLOY_USER  
SERVER: $DEPLOY_SERVER  
REMOTE_PATH: $REMOTE_PATH  
LOCAL_PATH: '.'  
![1.png](/t5/image/serverpage/image-id/280415iE2797944F316A872/image-size/large?v=v2&px=999 "1.png")  
![4.png](https://community.atlassian.com/t5/image/serverpage/image-id/280418i99C59F38D09062C5/image-size/large?v=v2&px=999 "4.png")  
![2.png](https://community.atlassian.com/t5/image/serverpage/image-id/280419iD050FBDDB17B0381/image-size/large?v=v2&px=999 "2.png")


Answers:
author: Patrik S
body: Hello [@Siddhant Pandey](/t5/user/viewprofilepage/user-id/5236498) and thank you for reaching out to Community!

From the screenshots you shared, it seems like your Python program is starting a service, and this service is running on a loop and not returning an exit code, which will keep the pipeline in the Running state. The way that pipelines identify when a command end is by verifying the exit code. If the command you are executing is running on a loop, it will not return an exit code and the pipeline will continue its execution.

In this case, you might want to check if the service you are starting (it seems to be Uvicorn) has an option available to run in detached mode, where the service will start and keep running in the background, while the pipeline can continue to the next commands.

I found the following thread that might be of help, which has a discussion on how to run Uvicorn in detached mode:

* <https://stackoverflow.com/questions/57412825/how-to-start-a-uvicorn-fastapi-in-background-when-testing-with-pytest>

Thank you, [@Siddhant Pandey](/t5/user/viewprofilepage/user-id/5236498) !

Patrik S

comments: author: Siddhant Pandey
body: yes you are right i have passed reload = true in my main.py file i will may that could be the issue.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Not receiving email notifications from BitBucket
Asked by Sathya T:

Hi,

I happen to notice that, I have not been receiving email notifications for PRs from Bitbucket for the last few days.

Could you pls check why and help in resolving the issue?

Many Thanks,

Sathya


Answers:
author: Patrik S
body: Hello [@Sathya T](/t5/user/viewprofilepage/user-id/5316058) and thank you for reaching out to Community!

Checking internally I see your email address was added to our impressions list because the most recent emails were bounced by your email server with the following error :

```
554 5.7.1 [internal] recipient address was suppressed due to customer policy
```

You should start receiving the emails as usual again. However, if you are still not receiving the emails, we would recommend reaching out to your email provider to confirm if they are not blocking emails coming from Atlassian.

Thank you, [@Sathya T](/t5/user/viewprofilepage/user-id/5316058) !

Patrik S

comments: author: Sathya T
body: thanks, a lot [@Patrik S](/t5/user/viewprofilepage/user-id/4603309)!


author: Thomas Perrin
body: Hi,

I am experiencing the same issue on my account

Could you check my email too ?

Many thanks,

Thomas


author: Patrik S
body: Hey [@Thomas Perrin](/t5/user/viewprofilepage/user-id/5339398) ,

I've removed your email from the suppression list as well :)

If you need further help in the future, we recommend creating a new question for your particular issue, as the notification of your comment here might end up being missed.

Thank you [@Thomas Perrin](/t5/user/viewprofilepage/user-id/5339398) !

Patrik S


author: Ke Lin
body: =


Tags: bitbucket-cloud

cloud
browser hangs when trying to "Clone" - any ideas what is wrong?
Asked by wothke:

I just created a new empty repository using the bitbucket.org web UI. As I have done dozens of times in the past, I then clicked "Clone" expecting to get the little popup that shows me the URL of the new repository so that I can copy/paste it into my Win10 cmd prompt.

Only this time the browser window completely freezes every time a click the "Clone" button on my bitbucket.org page. Has the bitbucket.org web UI been broken or what is the problem here?


Answers:
author: Patrik S
body: Hello [@wothke](/t5/user/viewprofilepage/user-id/5273176) and welcome to Community!

I was not able to reproduce the issue while opening the **Clone** option on Chrome Version 116.0.5845.187, so I suspect this might be a local browser issue. In order to check if that is the case, I'd like to ask you a few questions :

**1.** Have you tried a different browser and noticed the same behavior? You can try updating the browser to the latest version and check if the issue persists. Make sure to use one of the [Bitbucket Cloud Supported Browsers](https://confluence.atlassian.com/bbkb/which-web-browsers-does-bitbucket-support-1168845119.html#:~:text=Supported%20browsers&text=Bitbucket%20Cloud%20supports%20the%20latest,latest%20stable%20version%2C%20if%20necessary.)

**2.** Try to replicate the issue using your browser's Incognito/Private Mode. This might help us eliminate browser cache issues.

**3.** If you are using any extensions on your browser, try to temporarily disable them and confirm if the issue persists.

Let us know if those steps do help, or if you are still facing the issue after following them.

Thank you, [@wothke](/t5/user/viewprofilepage/user-id/5273176) !

Patrik S

comments: author: wothke
body: I have used the same Chrome browser version that I had always used successfully during the past year.   

I now also tested Incognito mode with all add-ons disabled but it makes no difference and the problem persists. I will not update to the lastest Chrome version since I have no desire to beta test the green bananas garbage that the Goggle nitwits might be experimenting with at the moment.  

I find it sad if the "Clone" popup implementation has been changed to no longer work on older browsers..


author: Patrik S
body: Hey [@wothke](/t5/user/viewprofilepage/user-id/5273176) ,

The recommendation is actually to use the latest stable version of the Browser, not the Beta version.

Since you mentioned to be facing the issue even in Incognito mode, did you have a chance to try in a different browser and check if the issue persists ?

Also, are any of your colleagues experiencing the same behavior with the Clone button?


author: wothke
body: I am not talking about Beta versions but about what those Google clowns consider production material..  

The problem does not exist when I am using Firefox (version 104.0.2) only in Chrome (version 86.0.4240.198).


Tags: bitbucket-cloud

cloud
How can we add dropdowns in .md files in bitbucket
Asked by Deepthansu GVS:

I am trying to add dropdowns in .md file in bitbucket.

\<details\>

\<summary\>Tips for collapsed sections\</summary\>

### You can add a header

You can add text within a collapsed section.

You can add an image or a code block, too.

\`\`\`ruby  
puts "Hello World"  
\`\`\`

\</details\>

The above code is working in the preview in VS Code but when rendering in the bitbucket, there are no dropdowns seen


Answers:
author: Patrik S
body: Hello [@Deepthansu GVS](/t5/user/viewprofilepage/user-id/5315405) and welcome to the Community!

I'm afraid collapsible sections are not yet available on Bitbucket Cloud's markdown. We do have an existing feature request to implement collapsible syntax :

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

We encourage you to add your **Vote** there so it brings more visibility to that feature. Also, you can add yourself as a **Watcher** to be notified whenever there's any progress on that feature's implementation.

For the currently supported syntax, you can refer to the below documentation :

* <https://support.atlassian.com/bitbucket-cloud/docs/readme-content/>

And the markdown demo repository which contains a series of examples of syntax :

* <https://bitbucket.org/tutorials/markdowndemo/>

Thank you, [@Deepthansu GVS](/t5/user/viewprofilepage/user-id/5315405) !

Patrik S

comments: author: Deepthansu GVS
body: Hi Patrik S, thanks for the reply,  
the syntax mentioned in the following link: <https://support.atlassian.com/bitbucket-cloud/docs/readme-content/>  
is not rendered in the bitbucket the tags are just ignored. If there is an alternate solution, please do suggest


author: Patrik S
body: Hey [@Deepthansu GVS](/t5/user/viewprofilepage/user-id/5315405) ,

Could you give us an example of the particular tag you tried to use that was not rendered correctly?


Tags: bitbucket-cloud

cloud
How tu use BITBUCKET_PIPE_SHARED_STORAGE_DIR variable ?
Asked by Ga?l Brochard:

hello,

I am triggering a pipeline from one repo to another one ( in bitbucket cloud) and I would like to pass the BITBUCKET_TAG value from the source pipeline.

I tried several solution and also tried using BITBUCKET_PIPE_SHARED_STORAGE_DIR variable but nothing work.

I followed this article: <https://support.atlassian.com/bitbucket-cloud/docs/advanced-techniques-for-writing-pipes/>

But it is not clear to me how to use this solution.

Could you help me ?

Regards,


Answers:
author: Patrik S
body: Hello [@Ga?l Brochard](/t5/user/viewprofilepage/user-id/5315435) and welcome to the Community!

Just to bring some context, when you start a pipeline a build container will be span up where your script will run. When you invoke a pipe in your script, a separate container is created where the pipe is executed, and a shared storage between the pipe's container and the build container is created, which is the variable BITBUCKET_PIPE_SHARED_STORAGE_DIR. This shared storage can only be used to pass files from the pipe's to the build container and/or to other pipes in the **same step**. It's not possible to share the content of that directory with a second pipeline.

With that in mind, per your description, I assume you are using the [atlassian/trigger-pipeline](https://bitbucket.org/atlassian/trigger-pipeline/src/master/) pipe, which provides the optional variable PIPELINE_VARIABLES where you can pass a JSON file containing all the variables you want to pass to the external pipeline being triggered. You can use this pipe variable to pass the first repository's BITBUCKET_TAG to the second repository's pipeline. Following is an example of using that variable :

```
script:
  - pipe: atlassian/trigger-pipeline:5.3.0
    variables:
      BITBUCKET_USERNAME: $BITBUCKET_USERNAME
      BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
      REPOSITORY: 'your-awesome-repo'
      REF_TYPE: 'branch'
      REF_NAME: 'master'
      CUSTOM_PIPELINE_NAME: 'secondrepo-pipeline'
      PIPELINE_VARIABLES: >
          [{
            "key": "BITBUCKET_EXPORTED_TAG",
            "value": "$BITBUCKET_TAG"
          }]
      WAIT: 'true'
```

In this example, we are exporting the variable BITBUCKET_TAG from the first pipeline to a variable named BITBUCKET_EXPORTED_TAG on the second pipeline.

It's important to note that passing variables is only currently available for [custom-triggered pipelines](https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/#Custom--manual--pipelines), so make sure the pipeline in the second repository is defined as **custom** so you are able to pass the variables.

Hope that helps! Let me know in case you have any questions.

Thank you, [@Ga?l Brochard](/t5/user/viewprofilepage/user-id/5315435) !

Patrik S


Tags: bitbucket-cloud

cloud
Stuck on Creating repository. Please wait a moment while we create your repository.
Asked by nickdekh:

Hi guys,

How do I delete a repo that is stuck on the stage of "Creating repository. Please wait a moment while we create your repository." ?

Please help!


Answers:
author: Ben
body: Hi Nick!

I have found the repository (associated with a team workspace) that was stuck in "CREATING" state and deleted it manually from my end.

Please attempt to import/transfer the repo again and let me know how it goes.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: nickdekh
body: Hi Ben,

Thank you very much for your assistance!

The repository stuck in "CREATING" state is gone thanks to you.

What do I do if the same issue reoccurs someday in the future again?

I do understand that posting a question here is one of the options, but is there any solution for the issue, which I could apply myself from my end?

Please let me know.

Nick


Tags: bitbucket-cloud

cloud
Allow pull request only if same commits were merged in a different branch before
Asked by bogdanTudorStefan:

Can I define a rule for accepting pull requests in a branch only if the commits were previously merged in a "test" branch?

For example in our organization we have a "master" branch, a "test" branch and a diffrent branch for every bugfix (let's address them with "a", "b"...).

I want to create a rule so you are not allowed to create or aprove a pull request of brances "a" or "b"... to "master" if all the commits contained in branches "a" or "b"... are not contained yet in the "test" branch. (meaning that they were not tested)

Can you help me?


Answers:
author: Aron Gombas _Midori_
body: It is not possible at the moment.

More precisely, your requirement is rather custom, so I think having *precisely* this feature is not very realistic. But! If you look at the Bitbucket roadmap, you can see a feature coming soon which will allow developers to add custom merge checks!

This is exactly what you need to implement your requirement.

See: [https://www.atlassian.com/wac/roadmap/cloud/Custom-merge-checks?search=merge\&p=215ad4ab-15](https://www.atlassian.com/wac/roadmap/cloud/Custom-merge-checks?search=merge&p=215ad4ab-15)


author: Saxea _Flowie_
body: Hi [@bogdanTudorStefan](/t5/user/viewprofilepage/user-id/5315242)

I'm just wondering if having 'a' and 'b' in the 'test' branch is sufficient. Shouldn't passing the test also be a requirement? How are you currently tracking and enforcing this?


Tags: bitbucket-cloud

cloud