youngmon/atlassian-qna huggingface dataset:
Is ?Commit checker for Jira issues? app available to ?Bitbucket Server? license?
Asked by Galit sobel__:

Hi,

Is 'Commit checker for Jira issues' app (Bitbucket Server - Jira integration - Commit Checker) available to 'Bitbucket Server' license or only to 'Data Center' license?

Bitbucket version: 8.2.4

According to this URL, I was expected to have 'Jira issues' configuration option under Repository settings Workflow, but there is no 'Jira issues' option.

<https://confluence.atlassian.com/bitbucketserver082/commit-checker-for-jira-issues-1141978929.html>

Could you please advise?

Galit


Answers:
author: Aron Gombas
body: The topmost part of the page you linked clearly says:
> This feature is available with a Bitbucket Data Center license.

comments: author: Galit sobel__
body: I saw this part, I've asked because this feature by default is installed and enabled.

Is there any way to activated it at the server version?

If not, is there other available feature which can give the same capabilities at the server release?


author: Aron Gombas
body: There is this app: [https://marketplace.atlassian.com/apps/1214430/better-commit-policy-for-bitbucket?hosting=server\&tab=overview](https://marketplace.atlassian.com/apps/1214430/better-commit-policy-for-bitbucket?hosting=server&tab=overview)

It allow defining commit policies on the Jira-side then validating those in the Bitbucket-side, even before creating commits. It is much more powerful than the built-in feature, and it works on Server, too.


author: Galit sobel__
body: Will try it,

Thanks!


Tags: bitbucket-server

server
Error while importing GitHub private repo to Bitbucket.
Asked by Sarsij:

Getting the below error while importing my private repo from github to bitbucket.

1. 13:26:58 git import for: \<Github URL\>
2. 13:26:58 Cloning \<github URL\>
3. 13:26:58 Remote Git clone failed: \<class 'bitbucket.apps.asyncx.tasks.RepoImportTask.ImportException'\>: Command failed. Return value: 128


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

Is the GitHub repository you are trying to import private? If so, are you providing authorization details on the import page?

Please keep in mind that you will need to generate a personal access token for your GitHub account, and use that instead of your account's password in the import form, as GitHub has deprecated basic password authentication for Git operations.

You can find in the link below how to generate a personal access token:

* <https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token>

Please feel free to let me know if this works for you or if you're still experiencing issues.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Feature: request to extend swagger definition with pagination parameters
Asked by Sander Mol:

Greetings Atlassian,

The current [OpenAPI/swagger defintion of Bitbucket Cloud](https://api.bitbucket.org/swagger.json)does not contain consistent definitions of the HTTP parameters if \`page\` and \`pagelen\` which are used to control the pagination of paginated collections.

Only [GET /2.0/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-commit-commit-pullrequests-get) contains this definition currently.

My request to add these parameters to all paginated objects, so clients can properly get generated with pagination support. This is about the following OpenAPI definitions:

```
parameters: [
...
{
 "name": "pagelen",
 "in": "query",
 "description": "How many pull requests to retrieve per page",
 "required": false,
 "type": "integer",
 "default": 10,
 "format": "int32"
},
{
 "name": "page",
 "in": "query",
 "description": "Which page to retrieve",
 "required": false,
 "type": "integer",
 "default": 1,
 "format": "int32"
}]
```


Answers:
author: Theodora Boudale
body: Hi Sander!

I went ahead and created a request in our issue tracker here:

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

You can add your vote and comment to that ticket to further express your interest.

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

Kind regards,  
Theodora

comments: author: Sander Mol
body: Amazing! If I could, I would contribute myself :) Hopefully this is the right way to communicate these requests. Appreciate the effort!


author: Theodora Boudale
body: You are welcome, Sander! And yes, it's ok to communicate these requests here. If you're on a Standard or Premium plan you can also create a ticket with the support team via this link: [https://support.atlassian.com/contact/#/?inquiry_category=technical_issues\&support_type=customer](https://support.atlassian.com/contact/#/?inquiry_category=technical_issues&support_type=customer) and the engineer working on your support ticket can also create a feature request / bug report.

You can check if there is an existing request for what you are asking by searching in our issue tracker:

<https://jira.atlassian.com/browse/BCLOUD-22452?jql=project%20%3D%20BCLOUD>


Tags: api

bitbucket-cloud

cloud

rest-api

swagger
Bug: pagination next object does not "lack" on the last page
Asked by Sander Mol:

Greetings Atlassian,

According to the [pagination documentation](https://developer.atlassian.com/cloud/bitbucket/rest/intro#pagination), the \`next\` property of a paginated collection is the recommended way to 'loop' through your collections.

**Expected**

The last page of a collection should omit the value of \`next\` to indicate this is the last page, as described in the documentation.
> Lack of a next link in the response indicates the end of the collection.

**Actual**

On the last page of a collection, the \`next\` value actually links back to the first page:

```
{  
   "page": 2,
   ...
   "size": 38,
   "next": "http://bitbucket-pipelines.prod.public.atl-paas.net/rest/1.0/accounts/{UUID}/repositories/{REPO_UUID}/variables?page=3&pagelen=10",
   "previous": "http://bitbucket-pipelines.prod.public.atl-paas.net/rest/1.0/accounts/{UUID}/repositories/{REPO_UUID}/variables?page=1&pagelen=10",
   "pagelen": 10
}
```

**Work around**

The workaround is to of course generate your own URL, but the whole purpose is to not have to do this:
> However, clients are not expected to construct URLs themselves by manipulating the page number query parameter. Instead, the response contains a link to the next page. This link should be treated as an opaque location that is not to be constructed by clients or even assumed to be predictable.


Answers:
author: Theodora Boudale
body: Hi Sander,

This looks like a bug with the repository variables endpoint. There are actually two bugs:

The first one is that the links for "previous" and "next" are invalid, as you can see in the sample response you posted here. This bug is tracked in the following bug report: <https://jira.atlassian.com/browse/BCLOUD-20910>

The "next" field is indeed present even when there is no next page. I created a bug report for this here: <https://jira.atlassian.com/browse/BCLOUD-22441>

If you have less than 100 repository variables, you can use ?pagelen=100 in the API call (100 is the maximum allowed value for pagelen for this endpoint). All variables will then be returned in one page, and the "next" field will not be included in the response.

Kind regards,  
Theodora

comments: author: Sander Mol
body: Thanks for dissecting the scenario in smaller issues, and link/creating the appropriate tickets :)

The use-case is needed for an infinite amount of results (used for a Terraform Provider), as such I will likely construct my own pagination URL increasing the page parameter in every iteration.


Tags: bitbucket-cloud

cloud

rest-api
How to change the code snippet for checking out a branch
Asked by Ryan Roberts:

Is there a way to change the default code snippet that's provided for checking out a new branch?  

i.e. I want to add \`git fetch \&\& git checkout \<branch-name\>\` rather than just \`git checkout \<branch-name\>\`![Screen Shot 2023-01-29 at 10.23.19.png](/t5/image/serverpage/image-id/236996iE32EA53EC704B346/image-size/large?v=v2&px=999 "Screen Shot 2023-01-29 at 10.23.19.png")


Answers:
author: Syahrul
body: G'day [@Ryan Roberts](/t5/user/viewprofilepage/user-id/5132578), and Welcome to community!

Is there any particular reason or use case why you need git fetch in the URL?

I ask because the URL is currently not editable, so if you can provide me with the reason or use case, I can create a feature request on your behalf.

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
Cannot rename empty repository
Asked by ikubaku:

I found that an empty repository cannot be renamed from the repository settings. The page shows following error when I try to save the modified repository name.

> Please fix errors below
>
> Main branch needs your attention

Do I have to at least commit once to modify this settings?


Answers:
author: Blue Ridge Consultants
body: Yes. Add a commit then try again.


author: Patrik S
body: Hello [@ikubaku](/t5/user/viewprofilepage/user-id/5132638) ,

Welcome to Atlassian Community!

Thank you for reporting this! I was able to reproduce the issue with the same error, so I went ahead and raised a bug in our public issue tracker :

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

I would suggest you to add your vote there, since this helps both developers and product managers to understand the impact. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all bug fixes are implemented with [this policy](http://[https://confluence.atlassian.com/support/atlassian-cloud-bug-fix-policy-206865884.html]) in mind.

The current workaround is to add at least one commit to the repository and then try to rename it again.

Thank you, [@ikubaku](/t5/user/viewprofilepage/user-id/5132638) !

Patrik S


Tags: bitbucket-cloud

cloud
How to loop on pipeline steps
Asked by S?bastien Boulet:

Hi,

I have a first step which create a json file (as artifact) with one or many jobs to do.   

I would like to do *n* times the next step, one time for each object in the json artifact.   

Is it possible to do that with bitbucket pipelines?

Best regards,

---

S?bastien


Answers:
author: Theodora Boudale
body: Hi S?bastien,

This is not possible with Bitbucket Pipelines. What you can do instead is use a for loop in the next step in order to do the *n* jobs in that one step.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
https://api.bitbucket.org/2.0/repositories ???
Asked by Antonius Golly:

What do you see calling this endpoint?

<https://api.bitbucket.org/2.0/repositories>

I'm seeing the work of a guy called Jwalton.

Can someone explain why that is? Is that intended?

![tmp.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/236986i72B15296F7C41B0C/image-size/large?v=v2&px=999 "tmp.PNG")


Answers:
author: Blue Ridge Consultants
body: That is a (confusing) sample response with public examples from Atlassian. We see that result, too.

If you need repos from a specific workspace, add a path of "/workspace_id_goes_here" to the call.


Tags: bitbucket-cloud

cloud
User is getting "user already exists" error message
Asked by michael:

I have invited a new user to join our bitbucket repository. He is getting "user already exists" error messages.

My bitbucket is the community edition with 5 free users. There are exactly three members currently in bitbucket, plus this one pending invite.

Where to do? What to do?


Answers:
author: Syahrul
body: G'day [@michael](/t5/user/viewprofilepage/user-id/5132157)

What is the exact error message the user received? It sounded like the user received the "That username already exists" error.

If yes, this means the username the user wanted to use has already been taken. Username is first come, first served.

So if someone else has already used it, the user needs to use a different unique username. Maybe add some number at the end of the username etc.

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
How to transfer every repository from one workspace to another.
Asked by bbalint:

Hi everyone,

We have several small teams. These teams currently work in separate Bitbucket workspaces. We've grown, so we decided that we want to merge all of our workspaces into one huge workspace, so every project and repository would be in one place.

We couldn't find the solution to move or copy every project and/or repository from one bitbucket workspace to another (apart from doing it one-by-one).  
For example GitLab has this function, we would be able to copy all of our repositories from Bitbucket to GitLab with only a few clicks.

I'm talking about more than 500 repositories in 3-4 workspaces, surely there must be a solution for this other than doing it one repository after another. We would like to stay in the Atlassian cloud, but moving all of our repositories to one place conveniently is also important.

I would really appreciate if you could point us in the right direction, or show us a solution for this issue.

Thank you


Answers:
author: Theodora Boudale
body: Hi [@bbalint](/t5/user/viewprofilepage/user-id/2776506),

Bitbucket Cloud doesn't have an option for bulk transferring repositories at the moment.

We have a feature request in our issue tracker that you can vote for to express your interest:

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

One of the members of the Bitbucket Cloud support team has developed a script for initiating a transfer request for all repositories in a given workspace to a new workspace. You can see more details in the following comment on the feature request, if you would like to make use of it:

* [https://jira.atlassian.com/browse/BCLOUD-12947?focusedCommentId=3166353\&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-3166353](https://jira.atlassian.com/browse/BCLOUD-12947?focusedCommentId=3166353&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-3166353)

Kind regards,  
Theodora

comments: author: bbalint
body: Hi Theodora,

Thank you for your answer.

That script is nice, but doesn't really solve the whole problem. The projects still need to be created, and of course still have to go through hundreds of emails (one for each repo) and finishing the transfer request manually.

Nice to know, there is already a feature request about it, hopefully one day it will be implemented.

In the meantime, I guess we have to take a look at the Bitbucket API and find a solution that fits our needs.

Best regards,  
Balint


author: Theodora Boudale
body: Hi Balint,

Thank you for the feedback, and yes, it's true that this doesn't solve the project creation or the acceptance of the transfer requests.

We have API endpoints for projects that you can look into if you want to automate the project creation:

* <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-projects/#api-group-projects>

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
How to provide entire project access from bitbucket?
Asked by adas1:

I have one bitbucket project containing more than 6-7 repositories. how can i provide entire project access to users without going repo one by one? However, I am not an administrator in that project, but I do have Bitbucket admin access.


Answers:
author: Mikael Sandberg
body: Currently that is not possible, but Atlassian is working on adding project-level permissions and is currently on track to be released in Q1 2023 according to the [public roadmap](https://www.atlassian.com/roadmap/cloud?status=future;comingSoon&search=project%20level).

comments: author: adas1
body: Thanks for the update


Tags: bitbucket-cloud

cloud
Bitbucket API - Get file with access token
Asked by Nitea:

Hello,

I would like to get a ZIP-file for a tag from my private repository via access token.

I manage to get the zip-file via App-password, but I don't want to share an App-password where the App-password gives acccess to all my repositories.

I use this URL to get the ZIP-file: <https://bitbucket.org/{username}/{repository}/get/{tagname}.zip>

Any suggestions on how I can accomplish this with access token created in the current repository?


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

I'm afraid that we do not support downloading archives with a repository access token at the moment.

I went ahead and created a feature request in our issue tracker:

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

I would suggest adding your vote (by selecting the **Vote for this issue** link) and a comment there to further express your interest. 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.

In the meantime, until this gets implemented, a way to achieve what you want without exposing your app password would be to use a git clone command as follows

```
git clone --depth 1 --branch <branch_or_tag> https://x-token-auth@bitbucket.org/<workspace-id>/<repo-slug>.git
```

**\<branch_or_tag\>** can be either a branch or a tag name  
**--depth 1** will clone only one commit and it is an optional argument. If you only need the source code files, I assume there is no need to clone the whole history.

You can then navigate to the clone directory and delete the .git folder if you don't need a repo, but only the source code files.

Kind regards,  
Theodora

comments: author: Nitea
body: Hello!

Thank you!

I made a bridge between My APP and Bitbucket where i handle unique tokens and then the bridge make the call via Username and App password.


author: Theodora Boudale
body: You are very welcome [@Nitea](/t5/user/viewprofilepage/user-id/5131776) and thank you for sharing your solution here.

Please feel free to reach out if you ever need anything else!


Tags: api

bitbucket-cloud

cloud
How to find size of workspace in Bitbucket.
Asked by Prajwal Ashok Nagrale:

how can we find the total size of codes or projects or repository in Bitbucket


Answers:
author: Sushant Verma
body: Hi [@Prajwal Ashok Nagrale](/t5/user/viewprofilepage/user-id/5070890)   

In Bitbucket Cloud, a repository admin can see the size under "Repository Details" under Settings.

In Bitbucket Server too, you can view it under Settings \> Repository Details after clicking on "Retrieve Size Details".  

Please follow the link : <https://community.atlassian.com/t5/Bitbucket-questions/How-to-find-out-repository-size/qaq-p/631316#>  

Regards,  
Sushant Verma


Tags: bitbucket-cloud

cloud
how do i add yaml file in bitbucket
Asked by chakali_nagaraju:

how do i add yaml file in bitbucket


Answers:
author: Ben
body: Hey Chakali,

Only one yml file is used in Bitbucket Cloud, this is called bitbucket-pipelines.yml

I would suggest following this guide below to get started with creating your first pipeline - this will generate the above yml file automatically:  
<https://support.atlassian.com/bitbucket-cloud/docs/configure-your-first-pipeline/>

Cheers!

- Ben (Bitbucket Cloud Support)
JUnit failures are not recognized in Bitbucket Pipelines
Asked by Patrick Steiner:

Failures in my JUnit test results are not recognized by Bitbucket Pipelines. The results file is created via fastlane (swiftlint) and looks like this:  

```
<?xml version="1.0" encoding="utf-8"?>
<testsuites><testsuite>
  <testcase classname='Formatting Test' name='SomeSwiftFile.swift'>
    <failure message='Lines should not have trailing whitespace.'>warning: Line:15 </failure>
  </testcase>
</testsuite></testsuites>
```

I also tried an different example file which looks like this:  

```
<testsuite tests="3">
  <testcase classname="foo1" name="ASuccessfulTest"/>
  <testcase classname="foo2" name="AnotherSuccessfulTest"/>
  <testcase classname="foo3" name="AFailingTest">
    <failure type="NotEnoughFoo"> details about failure </failure>
  </testcase>
</testsuite>
```

It looks like that both files are recognized as junit result files but the failures are not recognized. Take a look at the Bitbucket Pipelines result:

![Screenshot 2023-01-27 at 08.06.15.png](https://community.atlassian.com/t5/image/serverpage/image-id/236798iA99AACE126BD5597/image-size/large?v=v2&px=999 "Screenshot 2023-01-27 at 08.06.15.png")

Any ideas whats wrong here?


Answers:
author: Patrick Steiner
body: I think I figured it out, the problem is, that the xml needs the following properties:

```
<testsuite tests="3" skipped="0" failures="1" errors="0">
```

With this modification the junit xml is recognized correclty.  

```
<testsuite tests="3" skipped="0" failures="1" errors="0">
  <testcase classname="foo1" name="ASuccessfulTest"/>
  <testcase classname="foo2" name="AnotherSuccessfulTest"/>
  <testcase classname="foo3" name="AFailingTest">
    <failure type="NotEnoughFoo"> details about failure </failure>
  </testcase>
</testsuite>
```


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

junit
Trying to setup Pipeline - but always permission denied
Asked by Seffy Chon:

Hello,

Beginner in CI/DC - I'm trying to setup a bitbucket pipeline - I'm using Kinsta as a hosting service. Just wondering where I'm doing wrong.   

Things I did -   

Added a ssh-key on kinsta and bitbucket.  
Added a pipeline workspace variable with the SSH key inside.


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

Could you please share some more details regarding what you are trying to do? Specifically:

1. Are you using Bitbucket pipelines that run in our own infrastructure, or are using one of our [runners](https://support.atlassian.com/bitbucket-cloud/docs/runners/) to run builds in Pipelines on your own infrastructure?
2. In case you are using a Runner, which one is it? Linux Docker, Linux Shell, Windows, or MacOS Runner?
3. What are you using the SSH keys for? Cloning another Bitbucket repo during your build? Connect with SSH to your server during the build? Something different?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
How do I correctly report a potential bug? My question is marked as spam.
Asked by Thomas Flinkow:

In [this question](https://community.atlassian.com/t5/Sourcetree-questions/Set-git-credential-manager-exe-path-Error-introduced-with-update/qaq-p/820065) I describe what I think is a bug since it occurred only after updating to Sourcetree 2.6.6.0 which makes Sourcetree almost unusable.

However, the question has been marked as spam and I don't know if it will ever be seen now.

How else should I report a bug?


Answers:
author: Thomas Flinkow
body: Thanks for the un-spamming and also thanks for recommending me the right place to file bug reports.


author: Nic Brough -Adaptavist-
body: The spam bots can be a little over-zealous (the last version of Community was overrun and couldn't cope). I've un-spammed the question for you, hopefully the bots will learn a bit more about it!

However, Community isn't the right place for bug reports. It is a good place to talk about them, and sometimes Atlassian will take conversations here and create bugs for us. Generally though, bugs need to be raised as [support requests](https://support.atlassian.com/contact) (Which Atlassian then judge as bugs later and copy/convert as needed)


Tags: bug

spam