youngmon/atlassian-qna huggingface dataset:
Unable to clone, commit or push operations on the repository
Asked by Harshavardhanreddy_D:

Dear Team,

Hope you are doing well.

I'm not able to commit, clone or push the data to the bitbucket code repository. Can you please advise the same.

Thanks

Harsha


Answers:
author: Theodora Boudale
body: Hi Harsha and welcome to the community!

We would need some additional information to be able to help you.

You mentioned you cannot commit.

**1.** Are you committing locally on your computer, or do you add/change a file from Bitbucket Cloud website and commit from the website?

**2.** If the issue with committing happens locally, are you using Git from the command line, or are you using a Git GUI client? What error do you see when you try to commit?

**3.** In case you are committing from the website, what error do you see when you try to commit?

You also mentioned issues with cloning and pushing.

**4.** Do you use HTTPS or SSH for these operations?

**5.** What output do you get from the clone and push commands?

Kind regards,  
Theodora

comments: author: Harshavardhanreddy_D
body: Hi Theodora,

Thank you for your response. I'm not sure for couple of hours bitbucket not worked. But later it's working fine.

Thanks

Harsha


author: Theodora Boudale
body: Hi Harsha,

That's good to hear, thank you for the update. Please feel free to reach out if you ever need anything else!

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Pipeline parallel steps that aren't self-contained. Or running background processes/jobs.
Asked by Tom:

I'm trying to run firebase emulators in a Bitbucket pipeline and simultaneously run commands that would interact with them.

Whilst the emulators are running, new commands cannot be ran. I haven't been able to find a method to run the emulators in the background.

I've tried:

* Starting processes in the background using '\&'
* Terminal multiplexers like tmux

Bitbucket offers parallel steps ([Parallel step options](https://support.atlassian.com/bitbucket-cloud/docs/parallel-step-options)), but these are self-contained. There is no way to pass information between the two containers.

How can I run two processes at the same time? If this is by design, how can I pass information between parallel steps? And if this is intended behaviour, what is the justification?


Answers:
author: Tom
body: I solved this another way.

I created a new docker image and ran it as a service like so: <https://support.atlassian.com/bitbucket-cloud/docs/databases-and-service-containers/>

**Dockerfile**:

```
FROM node:bullseye

COPY .firebaserc /.firebaserc
COPY entrypoint.sh /entrypoint.sh
COPY firebase.json /firebase.json
RUN apt update
RUN apt install -y openjdk-17-jdk-headless
ENTRYPOINT ["/entrypoint.sh"]
```

**entrypoint.sh**

```
#!/bin/bash

npm i -g firebase-tools
npx firebase-tools emulators:start --token "$TOKEN"
```

Note: TOKEN is stored as a repository variable and generated using:

```
firebase login:ci
```

Then modify your bitbucket-pipelines.yml to include:

```
definitions:
? services:
??? emu:
????? image: <username>/<image name>
????? variables:
??????? TOKEN: $TOKEN
```

and the emu service under step:

```
- step:
    script:
...
    services:
      - emu
```

I hope that helps someone!


Tags: background

bitbucket-cloud

bitbucket-pipelines

cloud

concurrent

docker

parallel
How to recover user/groups and permissions in bitbucket datacenter
Asked by Anjum_Yaseen:

How to recover user/groups and permissions in bitbucket datacenter?

I tried restoring RDS DB from snapshot, but still its not showing any users/groups. Is there way I can restore users/groups ?


Answers:
author: Baskar Annamalai
body: Hi Anjum_Yaseen,

The users, groups, and permissions are stored in the database hosted on Bitbucket. If the database was corrupted, then it's almost impossible to restore the data. It is best practice to create a backup on a daily basis; if you have any last known good backup, you should move with it.

Best regards,  
Baskar Annamalai  
ServiceRocket.


Tags: bitbucket-server

server
I generated my ssh keys and added it to my account but i am not able to access my git through ssh
Asked by Varun Narayanan:

I added my public key in my user settings but still i am unable to clone my repositories


Answers:
author: Patrik S
body: Hello [@Varun Narayanan](/t5/user/viewprofilepage/user-id/5210618) ,

Welcome to the Atlassian Community!

After setting up the SSH on the bitbucket side, you also need to ensure that the correct key is being used by your local system by [Adding your key to the ssh-agent](https://support.atlassian.com/bitbucket-cloud/docs/set-up-personal-ssh-keys-on-linux/#Add-your-key-to-the-SSH-agent) .

If you have already done that, we will need more details about the error you are facing to investigate further.

In this case, could you please try cloning the repository with the command below and share with us the full output ?

```
GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git clone git@bitbucket.org:<workspace>/<repository>.git
```

This command will include verbose logs that will have more information about what ssh keys are being tried so we can confirm if your local configuration is correct. Please make sure to sanitize any personal/private information when sharing the logs here (such as username, repository name, workspace name, etc) as this is a public forum.

Thank you, [@Varun Narayanan](/t5/user/viewprofilepage/user-id/5210618) !

Patrik S

comments: author: Varun Narayanan
body: I resolved the issue by configuring my config file

my now config file looks like this ,

```
Host bitbucket.org
Hostname bitbucket.com
IdentityFile ~/.ssh/your_privatekey
```

by adding these lines in my config file solved the issue .


Tags: bitbucket-cloud

cloud
How to see which branch a commit was made on when grabbing commits and branches from the cloud api?
Asked by Mir Aman:

<https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/commits>

I am using the above endpoint to pull all commits from all projects and I want to be able to link commits to the branch it was made on. But I dont see any reference to the branch, under "parents" object, there is only reference to the parent commit.

Does anyone know where I can find this relationship?


Answers:
author: Patrik S
body: Hello [@Mir Aman](/t5/user/viewprofilepage/user-id/5210593) ,

Welcome to the Community!

While the [List commits endpoint](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-commits-get) doesn't directly return the branches that the commit is part of, we do have a feature request opened to implement the ability to get the branches that contains a commit :

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

Feel free to add your **vote** there and mark yourself as a **watcher** to receive first-hand updates on the implementation of that feature.

A workaround I can think of is to provide the branch name in the [List commits endpoint](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-commits-get) so it will just return the commits for that specific branch, like in the below example :

```
https://api.bitbucket.org/2.0/repositories/<workspace>/<repository>/commits/<branch name>
```

You could first get the [List of branches](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-refs/#api-repositories-workspace-repo-slug-refs-branches-get) and then for each branch returned, call the endpoint above to get all the commits contained in that particular branch.

Hope that helps!

Let me know in case you have any questions.

Thank you, [@Mir Aman](/t5/user/viewprofilepage/user-id/5210593) !

Patrik S

comments: author: Mir Aman
body: I just want to add incase anyone else needs this for future reference, the method suggested by Patrik works, but there is a lot of redundant data, as commits made on the parent branches are included in the child branch. This requires some cleanup after getting the response but otherwise is a good solution.


Tags: api

bitbucket-cloud

branch

cloud

commit
how to send test report playwrite using bitbucket in slack
Asked by Kirill Kozlov:

I use playwriter for testing. A bitbucket to run the pipeline. I have already written the code that prepares the environment, runs the tests, and saves the test results in artifacts.  
But I can't send a report from artifacts to slack in any way.  
Everything is fine with the webhook settings. I managed to send a simple report in which there is information about whether the tests pass or not. But here it was not possible to send a report that is stored in artifacts. I would be very grateful for help.


Answers:
author: Patrik S
body: Hello [@Kirill Kozlov](/t5/user/viewprofilepage/user-id/5210440) ,

Welcome to the Community!

As per your description, you have managed to send a simple report to Slack with the information if the tests passed or not. In this case, could you please with us here the bitbucket-pipelines.yml file you used to run that test ? This is so we can have a better picture of how you have implemented the pipeline.

Also, what is the format (XML,json, etc) of the file that contains the results of the test you want to share in Slack? Do you want to share the content of the file as a message in Slack or as an attachment?

Thank you, [@Kirill Kozlov](/t5/user/viewprofilepage/user-id/5210440) !

Patrik S


Tags: cloud

slack
GC
Asked by H?ctor Fenoll Malonda:

Hi

Please run garbage collection on our repository (sa\*\*\*\*\*\*\*\*23)

Could you execute it at 00:00 GMT?

Thanks, best regards


Answers:
author: Nic Brough -Adaptavist-
body: You will need to raise this with Atlassian support, not the community (we have less access to your Bitbucket than you do!)


Tags: bitbucket-cloud

cloud
Local runner: docker not found when running multiple steps or pipelines in parallel
Asked by Hannes Kuchelmeister:

Hi,

on my local runner I face an issue when running either parallel pipeline steps (see image) or multiple pipelines in parallel. All steps but one that use docker end up returning bash: docker: command not found.

![Screenshot 2023-05-03 112620.png](/t5/image/serverpage/image-id/254993i442F3A09CF0BB288/image-size/large?v=v2&px=999 "Screenshot 2023-05-03 112620.png")

I was able to create a pipeline that reproduces the issue:

```
image: python:3.8.5-buster

clone:
  lfs: true

pipelines:
  custom:
    custom-debug-pipeline:
      - parallel:
        - step:
          runs-on: 
            - 'self.hosted'
            - 'linux.shell'
          clone:
            enabled: false
          script:
            - echo "$PATH"
            - docker container ls
            - docker image ls 
        - step:
          runs-on: 
            - 'self.hosted'
            - 'linux.shell'
          clone:
            enabled: false
          script:
            - echo "$PATH"
            - docker container ls
            - docker image ls 
```

How can I solve this?


Answers:
author: Hannes Kuchelmeister
body: I found the issue myself. I had two runners tagged like this but only the non-HIL runner had docker installed.

![Screenshot 2023-05-03 112620.png](https://community.atlassian.com/t5/image/serverpage/image-id/255012i5D1DF75DD424F415/image-size/large?v=v2&px=999 "Screenshot 2023-05-03 112620.png")

I fixed it by tagging the docker runner with an additional docker tag

![Screenshot 2023-05-03 133543.png](https://community.atlassian.com/t5/image/serverpage/image-id/255014iFA3F1B8CBCC9FFDC/image-size/large?v=v2&px=999 "Screenshot 2023-05-03 133543.png")

and then updating all pipeline steps that require docker to be using:

```
  runs-on: 
    - 'self.hosted' 
    - 'linux.shell' 
    - 'docker'
```


Tags: bitbucket-cloud

bitbucket-runners

cloud

docker
Response error-403 on trying to fetch Bitbucket workspace members list using API.
Asked by kompal.sithta:

I have been trying to fetch the list of Bitbucket users using API present for workspace members.

The API I have been using so far is - <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-hooks-get>

On running the following code: I am getting the response error -403

import requests  
import json

url = "<https://api.bitbucket.org/2.0/workspaces/{workspace> name}/members"  
#<https://api.bitbucket.org/2.0/repositories/rndaxtria/salesiq-auto-st//refs/branches>

username = "username"  
password = "password"

headers = {  
"Accept": "application/json",  
}

response = requests.request(  
"GET",  
url,  
headers=headers,  
auth= (username,password)  
)

print(response)


Answers:
author: Fabio Racobaldo _Herzum_
body: Hey [@kompal.sithta](/t5/user/viewprofilepage/user-id/5079083) ,

403 error means that user is not an owner on the specified workspace

Fabio

comments: author: Patrik S
body: Hello [@kompal.sithta](/t5/user/viewprofilepage/user-id/5079083) ,

Just adding to Fabio's response, for the [List users in a workspace](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-members-get) endpoint the 403 error can be returned in the following scenarios :

* You are not an **Admin** of the workspace in question
  * In order to get the list of members in a workspace through the API request, you need to be an Admin of the said workspace.
* The credentials you are using are lacking privileges :
  * To authenticate the API request, you will need to use the bitbucket account username along with an [app password](https://support.atlassian.com/bitbucket-cloud/docs/create-an-app-password/). For that particular API endpoint, the app password is required to have at least **account:read** permission selected.

Thank you, [@kompal.sithta](/t5/user/viewprofilepage/user-id/5079083) !

Patrik S


author: kompal.sithta
body: Thankyou [@Patrik S](/t5/user/viewprofilepage/user-id/4603309) and [@Fabio Racobaldo _Herzum_](/t5/user/viewprofilepage/user-id/781528) for your help


Tags: bitbucket-cloud

cloud

python
SSL Setup in Bitbucket not working
Asked by karthikeyan ms:

Hi,

I tried setting up SSL certificate using this link and generate a self signed certificate.

<br />

[https://confluence.atlassian.com/bitbucketserver/secure-bitbucket-with-tomcat-using-ssl-776640127.html#:\~:text=The%20default%20connection%20for%20Bitbucket,only%20access%20to%20your%20instance](https://confluence.atlassian.com/bitbucketserver/secure-bitbucket-with-tomcat-using-ssl-776640127.html#:~:text=The%20default%20connection%20for%20Bitbucket,only%20access%20to%20your%20instance).

But updating the site is not working and in the logs i can this error.

Caused by: java.io.IOException: Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available  
at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2129)  
at java.security.KeyStore.load(KeyStore.java:1445)  
at org.apache.tomcat.util.security.KeyStoreUtil.load(KeyStoreUtil.java:69)  
at org.apache.tomcat.util.net.SSLUtilBase.getStore(SSLUtilBase.java:217)  
at org.apache.tomcat.util.net.SSLHostConfigCertificate.getCertificateKeystore(SSLHostConfigCertificate.java:207)  
at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:283)  
at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:247)  
at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:105)  
... 33 more  
Caused by: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available  
at javax.crypto.Mac.getInstance(Mac.java:181)  
at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2107)  
... 40 more

Regards,

Karthik


Answers:
author: Baskar Annamalai
body: Hi Karthikeyan,

The likely cause of this error is that the Java version the app is built with is different from the Java version being used to generate the signing key. Please refer to the supported Java platform for Bitbucket - <https://confluence.atlassian.com/bitbucketserver/supported-platforms-776640981.html#Supportedplatforms-javaJava>

Best regards,  
Baskar Annamalai  
ServiceRocket.


Tags: bitbucket-server

server

ssl
Bitbucket Pipe for aws-cli v2 with OIDC
Asked by James Pinkster:

Hi All

Does there exist a somewhat generic Bitbucket Pipe that wraps the AWS CLI v2 command and includes the OIDC authentication options?

We've used some of the other pre-baked AWS Pipes such as "atlassian/aws-s3-deploy" which have the OIDC authentication stuff baked in and works quite nicely.

However when other AWS CLI commands are needed in automation, we've had to create some custom script to handle the OIDC_TOKEN and call sts assume-role-with-web-identity to get authenticated and then go ahead and run the desired aws cli command.


Answers:
author: Igor Stoyanov
body: [@James Pinkster](/t5/user/viewprofilepage/user-id/4356906) hi.   

Does there exist a somewhat generic Bitbucket Pipe that wraps the AWS CLI v2 command and includes the OIDC authentication options? -- I think the answer is **no** .  

Pipes are the small wrappers, that's allow you to automate some common works, but not the full support like boto3 package for aws cli.  

Full list of aws pipes you could find here: [Bitbucket AWS pipes](https://bitbucket.org/product/features/pipelines/integrations?&search=aws) .  

Also maybe[this article](https://support.atlassian.com/bitbucket-cloud/docs/deploy-on-aws-using-bitbucket-pipelines-openid-connect/) will help you.  
Here *amazon/aws-cli* docker image is used.  

```
image: amazon/aws-cli
pipelines:
  default:
    - step: 
        oidc: true
        script: 
          - export AWS_REGION=us-west-2
          - export AWS_ROLE_ARN=arn:aws:iam::XXXXXXXXXXXX:role/oidc-demo
          - export AWS_WEB_IDENTITY_TOKEN_FILE=$(pwd)/web-identity-token
          - echo $BITBUCKET_STEP_OIDC_TOKEN > $(pwd)/web-identity-token
          - aws s3 cp s3://bucket/XXXXXX ./XXXXXXX
```

Regards, Igor

comments: author: James Pinkster
body: The snippet demonstrating the use of the "amazon/aws-cli" image with the AWS_WEB_IDENTITY_TOKEN_FILE environment variable is what I was looking for. I must have missed this when I originally read the docs.

Thanks, James


Tags: aws

bitbucket-cloud

cloud
How we can migrate bitbucket data from Cloud to Cloud without using plugin
Asked by nagabhushanpolukonda:

I would like to migrate bitbucket data from cloud to cloud and seeking for the steps to follow. please help


Answers:
author: Syahrul
body: G'day! [@nagabhushanpolukonda](/t5/user/viewprofilepage/user-id/5210026) and welcome to the community!

If I got this right you are migrating from an existing Bitbucket cloud workspace to another Bitbucket cloud workspace?

If yes, I believe this KB should help you with the steps needed to migrate your Bitbucket workspace:

[How to migrate a Bitbucket Cloud workspace to another workspace.](https://confluence.atlassian.com/bbkb/how-to-migrate-a-bitbucket-cloud-workspace-to-another-workspace-1229035601.html)

Let me know if you have any additional questions.

Cheers,  
Syahrul

comments: author: nagabhushanpolukonda
body: Thank you [@Syahrul](/t5/user/viewprofilepage/user-id/744536)

Can't we move users from one workspace to another workspace by following transfer repository procedure ?


author: Syahrul
body: Hi [@nagabhushanpolukonda](/t5/user/viewprofilepage/user-id/5210026)

Unfortunately, no. You'll have to manually re-invite the user and assign their permission again on the new workspace.

Cheers,  
Syahrul


author: nagabhushanpolukonda
body: Thanks [@Syahrul](/t5/user/viewprofilepage/user-id/744536) for the response.


Tags: bitbucket-cloud

cloud
What is the best way to sync up my org and bitbucket?
Asked by cryu:

Is there any way for me to sync up bitbucket and salesforce org? I guess the traditional way is to revert the changes?


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

Salesforce offers a CLI that you can use with Bitbucket Pipelines.

You can see the video and info provided here:

* <https://www.salesforce.com/video/3598965/>

Some additional resources:

++Documentation for Salesforce CLI++

* <https://developer.salesforce.com/tools/sfdxcli>

++Documentation for Bitbucket Pipelines++

* <https://support.atlassian.com/bitbucket-cloud/docs/build-test-and-deploy-with-pipelines/>

Kind regards,  
Theodora

comments: author: cryu
body: Thank you. It helped a lot!


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


Tags: bitbucket-cloud

cloud
I'm having trouble with my git pull, I don't have ping response what other test I have to do?
Asked by Diego Armando Ramirez:

help


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Diego Armando Ramirez](/t5/user/viewprofilepage/user-id/5209828) ,

please check that you have not network issue in order to reach the bitbucket instance. Moreover, how are you trying to do that (source tree, ide or command line)?

Fabio


Tags: bitbucket-cloud

cloud
Requesting SourceTree v2.6.10
Asked by Spencer Maroukis:

I recently requested an update to SourceTree through the approval process within my company, but when I requested the software SourceTree was on version 2.6.10. They've approved this version and told me to upload the installation file for packaging. Unfortunately because this process took a few months, SourceTree is now on a newer version.

Can anyone direct me to the 2.6.10 version for download?


Answers:
author: Mikael Sandberg
body: Hi Spencer,

Welcome to the Atlassian Community.

You can find the download archive for Sourcetree here, <https://www.sourcetreeapp.com/download-archives>
Does it support Mac OS Majave?
Asked by shaik khaleel:

I'm getting a screen where I can enter my Atlassian credentials. Does it support Mac OS Majave?

Thanks


Answers:
author: Johan Soetens _Dumblefy_
body: Hi,

I have been running Sourcetree without any issues on macOS Mojave.

Both are fully updated (Sourcetree 3.0.1, Mojave 10.14.2).
MadCap Flare and Head branch
Asked by Gail Caldera:

Hi,

We have integrated our Flare project with Git. However, whenever we do a pull request through Flare, we get the following error message:

Pulling local changes from remote...  
Error occurred in LibGit2Sharp : 'HEAD' is not a valid branch name

The source control operation finished with warnings and/or errors. Press Close when you are done reviewing the messages.

In sourcetree, under Remotes we have Origin. Under Origin we have the HEAD and master listed. What do these mean and does it have anything to do with the error we are getting in Flare? We have contacted Flare, however, have not been able to resolve the issue.


Answers:
author: Gail Caldera
body: Thanks for the response Michael! We are working off the local copy of the master and pushing/pulling from the remote master. Do you know if it will break anything if I delete the head branch?

I also have this showing in source tree under description when updates are committed.

Master \> Origin/Master \> Origin/HEAD \> commit description.


author: minnsey
body: Hi  

I don't have direct experience of Flare but I would not expect to normally see a *branch* called HEAD under the remotes section. Master yes, but not HEAD. HEAD just means the latest commit on a given branch.  

I would check you are working on master locally and remotely.