youngmon/atlassian-qna huggingface dataset:
Bitbucket On Premise
Asked by Wisnu Widiarta:

Hi All,

I am new to BitBucket. Our organization requires an on premise BitBucket.

I have purchased for one year BitBucket DataCenter since the Server no longer sold.

Where do I need to start?

- Download the Bitbucket 7.16 ?

- Is it true that Datacenter must use Linux instead of Windows?

- Is following the manual : <https://confluence.atlassian.com/display/BitbucketServer/Getting+started> is the next thing to do?


Answers:
author: Nic Brough -Adaptavist-
body: Yes, you will need to download and install Bitbucket to get started with your first node.

No, it'll work fine on Windows. Most of us use Linux because it's generally faster, easier and cheaper, but Bitbucket is fully supported on Windows, and if your expertise is in running Windows machines, then that's the very best choice for you.

Yep, follow the install guide, it covers windows installs as well as Linux.

comments: author: Wisnu Widiarta
body: But based on <https://confluence.atlassian.com/enterprise/bitbucket-data-center-faq-776663707.html>

The DataCenter version is not supported under windows

### Does Bitbucket Data Center support Windows? {#toc-hId-1282907978}

No, Windows is not supported.

**Known issues**

* **Microsoft Windows is not supported for Bitbucket Data Center, or for 500+ user tiers.**
* You should not use Windows Resilient File System (ReFS) as NTFS is required.
* Apple macOS is evaluation only. MacOS cannot be used for production deployment.


author: Nic Brough -Adaptavist-
body: I am sorry, I got that wrong, and I stand corrected.

I remember the file system having to be changed because Windows doesn't use decent ones, but so few people use windows for Java based stuff, I have not been keeping up and did not know support for windows was not possible any more. I think I was assuming it was ok because it works for server.


author: Wisnu Widiarta
body: Thank you Nic. It is ok. At least now I am sure that I must use the Linux version and follow that guidance.


Tags: bitbucket-server

server
Automation of ScriptRunner Pre-Receive Hooks Addition
Asked by John Henry:

Hey everyone,

I have been running into this problem, and I am not sure how to properly solve it.

I have created a Python script that uses the BitBucket Atlassian plugin to create repositories under a given project. I have finished this task.

However, under each repository, I want to automate the process of including a default pre-receive (protect git refs) hook in ScriptRunner. I am not sure what is the best way to go about it is.

Does anyone have any clues or pseudocode? I have tried doing POST calls that mimic the network transaction, but I am getting a 500 error.

Thanks


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

Currently ScriptRunner for Bitbucket does not support automated creation of ScriptRunner Hooks.

This is something we are looking into providing support for in future.

In the meantime, I believe you have three options you could try:

1) Continue your experimenting with the POST calls you have been doing.

2) Are you aware of the Clone Repository Configuration Built-In Script (<https://docs.adaptavist.com/sr4bib/latest/features/built-in-scripts/clone-repository-configuration>) as this could answer your requirement in a different way?

3) Are you aware that when setting up global Hooks (as a Bitbucket administrator) using ScriptRunner for Bitbucket you can set them to apply to all current and future projects and repositories. Thereby negating the need to include the default hook each time.

Please let me know if any of these options help you achieve what you want to achieve?

Kind regards,

Robert Giddings,

Product Manager, ScriptRunner for Bitbucket


Tags: bitbucket-server

python

scriptrunner

server
Pipeline Runners Stuck in "Clone"
Asked by cindy:

Hello Atlassian Team,

I'm setting up a pipeline runner on a local server. I'm running into an issue where the build will get stuck during the "clone" step.

Looking into the container logs, it looks like the "system_auth-proxy" container is stuck. The "pause" and "clone" containers both have no activity in their logs as well.

I modified the pipeline YAML to have skip-ssl-verify parameter. The issue is still there with or without it.

Any ideas on how to resolve this?

Thank you!


Answers:
author: cindy
body: Issue is resolved. There was a Write permission issue for the WORKING_DIR. Once that was moved back to /tmp, the build continued.


Tags: bitbucket-cloud

bitbucket-pipelines

bitbucket-runners

cloud
Repo transfer / repo variables
Asked by Pavel Bastov:

I want to transfer a repo to a different account / workspace. This article says that commit history, wiki, and issue trackers are also transfered: <https://support.atlassian.com/bitbucket-cloud/docs/transfer-repository-ownership/>  

In my repo I have some pipelines configured that reference a handful of Repository Variables. If I transfer the repo, will the variables be preserved or will I have to recreate them in the destination repo?


Answers:
author: Caroline R
body: Hi, [@Pavel Bastov](/t5/user/viewprofilepage/user-id/4565686)! Welcome to the community!

It is possible to transfer **Repository variables** when transferring a repository to a different workspace. However, you will notice that after transferring the repo, the variables will disappear, but don't worry, you just need to activate the Pipelines in this new repository after the transfer to recover the repository variables. In order to do that, you can access the **Repository settings** \> under the **PIPELINES** section, open **Settings** \> **Enable Pipelines**.

Currently, it's not possible to transfer the **Deployment variables**. We already have a feature request to add the ability to transfer these Pipelines variables as well:

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

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 request.

I would suggest that you add 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.

Feel free to share any additional questions or concerns regarding this case.

Kind regards,  
Caroline

comments: author: Pavel Bastov
body: Thank you, Caroline!


author: Caroline R
body: You're welcome, Pavel!  
Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
BitBucket Pipeline Timestamp
Asked by Geoffrey He:

Is there a built in command (potentially under options like the max-time) to prepend timestamps at the start of all console output generated by a pipeline? If not, what other methods can I use to achieve the same result?

- Thank you


Answers:
author: Theodora Boudale
body: Hi [@Geoffrey He](/t5/user/viewprofilepage/user-id/4565360) and welcome to the community.

I'm afraid that we don't have a built-in command that does that. I can create a feature request for our development team to consider, please feel free to let me know if you'd like me to do that.

You could use [moreutils](http://joeyh.name/code/moreutils/) to do that. If you use a Docker image based on Ubuntu you can install it at the beginning of (each) script with

```
apt-get install moreutils
```

or you can create a custom Docker image that includes this tool.

Then, you can do the following for every command in the script(s) of your yml file:

```
- command | ts '[%Y-%m-%d %H:%M:%S]'
```

Kind regards,  
Theodora

comments: author: Mathieu Paquette
body: Please note that if the command fails, it's possible that exit error codes won't propagate properly resulting an incorrect pipeline status. So before applying this, please test your use case thoroughly.

Cheers,

Math


Tags: bitbucket-pipelines

cloud

date-time
Why is duration time 4x higher in Standard-Tariff than in Free-Tariff?
Asked by Michael Hohlfeld:

Hi there,

today i run out of my 50 free build minutes from my Free tariff. Because i need some more minutes right now, i decided to upgrade to the Standard-Tariff.

Well the upgrade was fast...

But now i'm wondering, why my same size deployments need 4x longer than before???

I didn't changed the bitbucket-pipeline.yaml file... i just upgraded my tariff.

The "Paused" status was the point where my free minutes are over and i upgraded my package:

![Bildschirmfoto 2021-09-20 um 20.21.51.png](https://community.atlassian.com/t5/image/serverpage/image-id/161149i76F4E270A2161B07/image-size/large?v=v2&px=999 "Bildschirmfoto 2021-09-20 um 20.21.51.png")


Answers:
author: Theodora Boudale
body: Hi Michael,

Were there any changes in the repo's source code that might have caused longer execution times? This is one possibility. It's difficult to say why this is occurring without checking the Pipelines logs, seeing what is executed, and comparing the builds before and after the upgrade.

My suggestion would be to create a ticket with Bitbucket Cloud support team to investigate this further. If there is an open support ticket, the support engineer working on your ticket will be able to access the builds and logs from our side and investigate this.

You can create a support ticket via <https://support.atlassian.com/contact/#/>, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. Please make sure to provide the URL of the repo in the details (the support ticket will be visible only to you and Atlassian staff, so your repo URL won't be publicly visible).

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

Kind regards,  
Theodora


author: Michael Hohlfeld
body: Just for others with same problem/issue...

Here is a part from my solved support-ticket:

*....*

* *Free plan -*
  * *KataContainer enabled: true*
  * *apt-get update and install took around 10-12 seconds each*

<!-- -->

* *Standard/Premium*
  * *KataContainer enabled: false*
  * *apt-get update and install took around 45+ seconds each*

*Background, we started rolling out kata container for our customer as mentioned in our document - <https://support.atlassian.com/bitbucket-cloud/docs/infrastructure-changes-in-bitbucket-pipelines/>. When you were on Free plan, your workspace is using kata container.*


Tags: bitbucket-pipelines

cloud
I can't clone old hg repos. How can I access them? Neither hg clone nor git clone works
Asked by vers_1:

I'm trying to clone old repos which were at hg. However I missed gh sunset event at Bitbucket and didn't convert my repos to git. Now when I try cloning repos I get

: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://"USERNAME"@bitbucket.org/"USERNAME"/"REPO"_029051_hg.git  
OUTPUT:  
ERROR: remote: Repository is in read only mode.  
fatal: unable to access '<https://bitbucket.org/>"USERNAME"/"REPO"_029051_hg.git/': The requested URL returned error: 403

How do I access my repo? Does the source code is buried?

I'm trying to clone via Sourcetree. Any help?


Answers:
author: Theodora Boudale
body: Hi everyone,

Atlassian made a decision to move away from maintaining and supporting Mercurial repositories in 2019.

This was announced in community:

* <https://community.atlassian.com/t5/Bitbucket-articles/What-to-do-with-your-Mercurial-repos-when-Bitbucket-sunsets/ba-p/1155380>

and on our blog:

* <https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket>

Bitbucket Cloud Support team is no longer able to restore those repositories.

If you are looking for a Mercurial repository that was public, all the public repos were archived by Software Heritage:

* <https://bitbucket-archive.softwareheritage.org/>

We will not be able to meet any further requests for recovery of private HG repositories and users will need to recover those from local copies only.

Kind regards,  
Theodora


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

Mercurial repos can no longer be accessed by users, however, the support team can provide you with a copy of the Mercurial repos that are owned by your workspace.

I went ahead and created a ticket with Bitbucket Cloud support team for you, using the email of your community account. You should have received an email with a link to the support ticket. Just in case you haven't received it, please let me know and I can post the ticket URL here. The ticket will be visible only to you and Atlassian staff, no one else can view its contents even if they have the URL.

Please feel free to let me know if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud

clone

cloud

mercurial

repository
why can I not set up OAuth consumer?
Asked by james.mckean:

I am in the Admin group of a bitbucket cloud workspace. When I attempt to set up an OAuth consumer, I cannot see the OAuth option in the setting nav pane. One other admin can, but at least one additional admin cannot.

There seems to be something different about our accounts, but I cannot figure out what. We have been line-by-line through our account in bb.org, and they are identical. I am wondering if there is something different in the Atlassian account, but I can't see much detail there.

I think that the admin who can set them up is the originl creator of the workgroup. I don't know if that makes a difference.

Any help would be appreciated.


Answers:
author: Theodora Boudale
body: Hi James,

When a user signs up for a Bitbucket Cloud account, a workspace is automatically created by Bitbucket for this user. This workspace that is automatically created by Bitbucket (and not manually by the user) is considered the user's personal workspace. New admins can be added to this workspace, but the "APPS AND FEATURES" section of such a workspace will show only to the owner.

Based on your description, it sounds like you may be using such a workspace. We have a ticket about this in our issue tracker:

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

If you want to keep using the existing workspace, then the user this workspace is associated with should generate the OAuth consumer. Alternatively, you can manually create a new workspace, transfer your repos there and work with that new workspace.

Kind regards,  
Theodora

comments: author: james.mckean
body: Yes, that sounds right. This has been a sandbox workspace for a few months, but I can imagine that it was the originally was his personal one and he just repurposed it. We will create a new one eventually, but to keep the POC on track, I will just let him create the OAuth consumer.

Thank you!


author: Theodora Boudale
body: You are very welcome, please feel free to reach out if you ever need anything else!


author: NayakS
body: [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) , Only bitbucket cloud admin able to create consumer,right?

Assume somebody is admin for project(XYZ) and created n number of repo under project(XYZ), in order to provide access to any application, do we need to create one consumer for this project(xyz) or n number of due to n number repo .


Tags: bitbucket-cloud

cloud

oauth
pipe: atlassian/aws-ecs-deploy does not support CODE_DEPLOY controller
Asked by Monica Gordillo:

I have an ECS cluster \& service that use CodeDeploy. However, I get this error when I use this pipe:

Failed to update the stack.

An error occurred (InvalidParameterException) when calling the UpdateService operation: Unable to update task definition on services with a CODE_DEPLOY deployment controller. Use AWS CodeDeploy to trigger a new deployment.


Answers:
author: Oleksandr Kyrdan
body: Hi [@Monica Gordillo](/t5/user/viewprofilepage/user-id/3759182)

Thank you for your question!

We'll investigate this case and notify you.

It'd be nice if you provide us with more details about your pipelines configuration and logs.

Best regards,  
Oleksandr Kyrdan

comments: author: Monica Gordillo
body: Hello [@Oleksandr Kyrdan](/t5/user/viewprofilepage/user-id/2885705) ,

I ended up using atlassian/aws-code-deploy:1.1.0 for my ECS code deployment. Within the AWS ECS service, I'm using CodeDeploy: ![ecs_screenshot.png](https://community.atlassian.com/t5/image/serverpage/image-id/162008i3E00E3C437BB9D95/image-size/large?v=v2&px=999 "ecs_screenshot.png")

With atlassian/aws-code-deploy:1.1.0, I had to upload my task definition outside of the pipe \& the BUNDLE_TYPE had to be set to YAML.


author: Ayush Ojha
body: I am facing the same issue [@Monica Gordillo](/t5/user/viewprofilepage/user-id/3759182) how does your pipeline look like? Can you please share?


author: Monica Gordillo
body: This is what I ended up using in my step:

- echo "Uploading task definition"  
- aws ecs register-task-definition --family $ECS_TASK_FAMILY_NAME --region="$AWS_DEFAULT_REGION" --cli-input-json file:///opt/atlassian/pipelines/agent/build/task-definition.json  
- pipe: atlassian/aws-code-deploy:1.1.0  
variables:  
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID_DEPLOY  
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY_DEPLOY  
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION  
COMMAND: 'upload'  
APPLICATION_NAME: "$CODEDEPLOY_APP_NAME"  
DEPLOYMENT_GROUP: "$CODEDEPLOY_DG_NAME"  
S3_BUCKET: "$CODEDEPLOY_S3_BUCKET_NAME"  
FOLDER: "${S3_BUCKET_FOLDER}/${ENV_FULL_TYPE}"  
BUNDLE_TYPE: 'YAML'  
ZIP_FILE: 'appspec.yml'  
VERSION_LABEL: 'appspec.yml'  
- pipe: atlassian/aws-code-deploy:1.1.0  
variables:  
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID # Optional if already defined in the context.  
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY # Optional if already defined in the context.  
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION # Optional if already defined in the context.  
COMMAND: 'deploy' # 'upload' or 'deploy'.  
APPLICATION_NAME: "$CODEDEPLOY_APP_NAME"  
DEPLOYMENT_GROUP: "$CODEDEPLOY_DG_NAME"  
S3_BUCKET: "$CODEDEPLOY_S3_BUCKET_NAME"  
FOLDER: "${S3_BUCKET_FOLDER}/${ENV_FULL_TYPE}"  
BUNDLE_TYPE: 'YAML'  
VERSION_LABEL: 'appspec.yml'  
DEBUG: 'true'


Tags: aws

bitbucket-pipelines

cloud
How do i contact bitbucket to get support with reducing repository below 4gb.
Asked by mntronslien:

Followed the trail to get support and there is no way to actually submit a support ticket. How do I trigger the pruning of the repo after having reset the git history to an earlier commit?

Note:

* I used reset and force push, not revert.
* I enabled the labs option to prune on delete AFTER having reduced the repo. Now it does not seem like doing anything.
* It is the labs section that tells me to contact support by submitting a ticket.


Answers:
author: Caroline R
body: Hi, [@mntronslien](/t5/user/viewprofilepage/user-id/1810266)!

Thank you for reaching out to Atlassian Community! You are more than welcome to request our help here :)

I confirmed you had 1 repository with a size of 3.7 GB, so I ran the GC against this repo and managed to reduce its size to 3.4 GB. Could you confirm if this is the local size?

Also, I would like to share with you that we already have a feature request to allow users to mark repositories for git GC, as you can check here:

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

Please consider adding yourself as a watcher to receive the updates as we make progress with this. If you are not familiar with our Feature Request Policy, you can read more about it [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html).

Feel free to share any additional questions or concerns regarding this case.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
pipe: atlassian/aws-code-deploy for yaml for ecs?
Asked by Monica Gordillo:

Can this pipe: atlassian/aws-code-deploy handle ECS CodeDeploy deployments?

pipe: atlassian/aws-ecs-deploy does not support the CODE_DEPLOY controller.


Answers:
author: Oleksandr Kyrdan
body: Hi [@Monica Gordillo](/t5/user/viewprofilepage/user-id/3759182)

Thank you for your question!

Please describe your case. We'll investigate it case and notify you.

It'd be nice if you provide us with more details about your pipelines configuration and logs.

Best regards,  
Oleksandr Kyrdan

comments: author: Monica Gordillo
body: I figured it out. atlassian/aws-code-deploy:1.1.0 can handle deployments to ECS. I had to use YAML for BUNDLE_TYPE.


Tags: aws

aws-codedeploy

bitbucket-pipelines

cloud
Composer install application dependencies
Asked by Jelle Tempelman:

I used to work with Jenkins but I'm trying bitbucket pipelines now. The only thing I can not figure out is if I have the possibility to run *composer install.*

My goal

I have an Codeigniter application with various composer dependencies. In my repository I don't have the dependencies, only the composer.json file telling composer to install these dependencies. I want to make a pipeline to install the composer dependencies and than push it all over FTP to my server. How can I do that?

What I do now:

* I use the docker image phpunit/phpunit
* The first step is *composer install*
* For the second step I use atlassian/ftp-deploy:0.3.6 to push it all to my server.

Everything ends up on my server but not my vendor map with the dependencies. What is going wrong?

I'm sorry if it's a dumb question, I'm new to both pipelines as to docker.


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

Just to give some context first: for every step that you define in your bitbucket-pipelines.yml file, a Docker container starts with the image you have specified, the branch of the repo that triggered the pipeline gets cloned in that Docker container (if you are running pipelines on branches), and then the script of that step runs. When this is finished, the Docker container gets destroyed.

If directories/files are generated or modified in one step and you would like to use them in one of the subsequent steps, you'll need to define them as artifacts in your bitbucket-pipelines.yml file:

* <https://support.atlassian.com/bitbucket-cloud/docs/use-artifacts-in-steps/>

Otherwise, they won't be available for the next step, since the Docker container of the first step gets destroyed, and then a new one starts with a fresh clone.

I believe that *composer install* writes in an existing directory, or generates a new directory, depending on the configuration.

What you can do is

**1.** either use the *atlassian/ftp-deploy:0.3.6* pipe in the same step where you run *composer install*

**2.** or define in the first step of your bitbucket-pipelines.yml file any directories/files that are generated or altered by composer install as artifacts, so that they will be available during the second step when you do the deploy.

E.g. if the dependencies are installed in the vendor directory, you can define it as an artifact as follows:

```
- step:
     script:
      - composer install
    artifacts:
      - vendor/**
```

If there are other directories or files that are generated or modified during this step and you'd like to deploy them as well, you can add them in the artifacts section.

I hope this helps, please feel free to let me know if you have any questions!

Kind regards,  
Theodora


Tags: bitbucket-pipelines