youngmon/atlassian-qna huggingface dataset:
Bitbucket Mercurial dismiss
Asked by tsunami:

Hi,

I had 2 or 3 repositories in my Bitbucket account with Mercurial. Is there any way to recover them?

Thanks in advance

Regards  
Marco


Answers:
author: Theodora Boudale
body: Hi Marco,

Yes, this is possible, the support team can provide you with a copy of your Mercurial repositories.

I created a support ticket 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 the email, please feel free to let me know and I can post the ticket URL here. The support ticket will be visible only to you and Atlassian staff, no one else can view its contents even if they the URL.

One of the Bitbucket Cloud support engineers will respond to the ticket and provide you with a copy of your Mercurial repositories.

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

Kind regards,  
Theodora


author: tsunami
body: Perhaps it should be in Questions section, but it seems I cannot change it now, sorry...


Tags: bitbucket-cloud
Integrate bitbucket with C#
Asked by kefah aleesa:

I want to integrate my c# service with bitbucket cloud by using rest API so I can

Fork repositories  
create branches   
edit files   
Grant users as admin to the new repositories  
I found that the Atlassian.Stash.Api library is the best for that  
But I feel confused by the authentication method should I use  
the library does not support the Oauth2 authentication and the basic authentication its not working I keep have this error :

One or more errors occurred. (Unexpected character encountered while parsing value: T. Pat

so can you help if Atlassian.Stash.Api supports Outh2 authentication ? and what the best way to integrated with bitbucket using c#

Thank you


Answers:
author: Nic Brough -Adaptavist-
body: This suggests your code is not sending valid text to the server when you make the rest call. You'll need to work out what is is sending and why replace the "T.Pat" it is sending with something valid.


Tags: bitbucket-cloud

cloud
Cannot clone from public repositories without SSH Key
Asked by Tyler Brown Cifu Shuster:

I'm having a problem across platforms (Pantheon, Platform.sh) where I have scripts that are set up to clone public repositories in public projects --- and the scripts are failing saying that permission is being denied based on the public key. When I add the public key to my organization, then the clone succeeds. However, there are certain contexts in which I won't know the public key ahead of time. What gives?


Answers:
author: Theodora Boudale
body: Hi [@Tyler Brown Cifu Shuster](/t5/user/viewprofilepage/user-id/2970759),

The SSH protocol requires both the client and the server to authenticate before sending any requests and Bitbucket Cloud only supports public key authentication. When you use SSH, authentication is always required for both public and private repos.

If you want to use SSH, you will need to set up SSH keys in order for the clone operation to work. The private SSH key needs to be on the machine that performs the clone operation and the public key should be added either as an Access key to the repos, or to a user with access to the repos. It is also possible to add the public SSH key to the workspace that owns the repos, but we advise using this option with caution, as in this case, we cannot track which user performed a certain operation.

If for whatever reason, it is not possible to set up SSH (in time), another option is to use HTTPS to clone, which will not require authentication for public repos.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
bitbucket password are not working
Asked by Subham Kr Gupta:

i just create bitbucket account with Gmail then i create repository then git push -u origin master command use then i type my password but showing password invalid.

how is it possible i'm so confused now i have logout it then i try to login then showing login failed your username or password invalid

how is it possible ?????


Answers:
author: Theodora Boudale
body: Hi [@Subham Kr Gupta](/t5/user/viewprofilepage/user-id/4678339) and welcome to the community.

We are deprecating Atlassian account password for Bitbucket API and Git activity:

* <https://bitbucket.org/blog/deprecating-atlassian-account-password-for-bitbucket-api-and-git-activity>

I am quoting from the blog post:
> Starting Sep 13, 2021, new Bitbucket users will not be able to use their personal Atlassian account password when using Basic authentication with the Bitbucket API or Git over HTTPS. They will need to use Bitbucket app passwords.
>
> Bitbucket users who created an Atlassian account before September 13, 2021 will be able to use their Atlassian account password to authenticate with the Bitbucket API or Git until March 1, 2022.

You can create an app password using the instructions in the doc below and use that for authentication when cloning/pushing to repositories:

* <https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/>

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

Kind regards,  
Theodora

comments: author: Subham
body: Hello sir/madam,

i seen there is a bug. when anyone create account or new login with gmail or else then password not working.

after login it will be logout it and reset the password then you can login.

there is bug....


author: Theodora Boudale
body: Hi [@subham gupta](/t5/user/viewprofilepage/user-id/4680129),

I'm afraid I haven't been able to reproduce this issue.

Could you please let me know:  
- When you signed up for the Bitbucket account, did you select "Continue with Google"?  
- When you say the password is not working, do you mean that it is not working when attempting to log in to the website?

Please note that when you sign up for a Bitbucket Cloud account using "Continue with Google", you are not asked to set a password for Bitbucket. Your Google account password will not work for email/password login to the website, it will only work if you log in with Google.

If you signed up using "Continue with Google", then you indeed need to request a password reset email to set a password, since no password was set during sign up.

Kind regards,  
Theodora


Tags: bitbucket-cloud
Tenable Scans - log4j - Bitbucket/Elasticsearch
Asked by Christopher Montgomery:

Is anyone else using Tenable to scan their servers for security vulnerabilities like CVE-2021-44228?

It appears that Tenable does not recognize the remediation for Bitbucket / Elasticsearch.

-Dlog4j2.formatMsgNoLookups=true

From what I can tell Atlassian cannot create a new bundled version of Bitbucket / Elasticsearch because of licensing agreements.

From Atlassian: We are unable to release an updated version of the bundled Elasticsearch version due to licensing changes for Elasticsearch versions later than 7.10

This means the file that Tenable is finding in the scan for an old version of the log4j jar file is going to remain on the server and continue to report as a vulnerability.

This also means the most current version of Elasticsearch that will work with Bitbucket is version 7.10.

<br />

I am curious if anyone else is in this situation with Tenable scans and what they might be doing to address this.

<br />

Thanks, Chris


Answers:
author: John Reynolds
body: Hi Chris - Same issue here. Tenable is flagging even with the new updates and security isn't liking the response from bitbucket on not updating the bundled version. Have you come to any solutions on your end?

comments: author: Christopher Montgomery
body: Hi John,

So far, we have not come up with a solution.


Tags: bitbucket-server

cve-2021-44228

server
SonarQube scanner don't show report in pipeline section
Asked by Marcin Nowak:

Hello, I have a problem with Bitbucket Pipelines. After SonarQube scan I don't recive a report in pipeline in report section. In my other repo I configured it in the same way and there it works. Maybe there is some problems in some global settings or maybe somethingis missing? Logs between pipelines in Sonar section are almost the same.

This is working pipeline in another repo. As you can see I have report in report section.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/174441iD31EDAFCBE3BAB98/image-size/large?v=v2&px=999 "image.png")

And here is a part of repo where reports are not working. As you can see the Sonar section is working, but there is no report :c

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/174439iF3288091AEC72530/image-size/large?v=v2&px=999 "image.png")![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/174440i8B4956C78C6CC458/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Syahrul
body: Hi [@Marcin Nowak](/t5/user/viewprofilepage/user-id/4677998)

Welcome to the community!  

Apologize for the confusion, please disregard the previous message.

The reports are uploaded to us from SonarQube through our REST-API and it's based against a commit, so please ensure that the report commits on SonarCube are the same as the one in Bitbucket.

If it's the same then the issue could be on the reporting itself where SonarCube is not sending the report to us in Bitbucket. If this is the case, I would suggest you go through the SonarCube documentation [here](https://docs.sonarqube.org/latest/analysis/bitbucket-cloud-integration/) to see if all the OAuth and permission are configured correctly.

If you still have an issue showing the report on your latest build after confirming all the configuration is correct please do reach out to our Support directly so we can investigate the issue further.

I hope this helps.

Cheers,  
Syahrul


Tags: bitbucket-pipelines

cloud
I want to buy license bitbucket server but not success
Asked by B?nh DSnake:

I want to buy license bitbucket server but not success, please help me


Answers:
author: Deepanshu Natani
body: Hi [@B?nh DSnake](/t5/user/viewprofilepage/user-id/4651664) Can you please elaborate on what exact issue you are facing?

comments: author: Deepanshu Natani
body: [@B?nh DSnake](/t5/user/viewprofilepage/user-id/4651664) It seems like, you are trying to buy a new Bitbucket server license.

Please note that Atlassian has ended sales for new server licenses and will also be ending support for server on February 2, 2024.

More information is available here: <https://www.atlassian.com/licensing/bitbucket>

You will have to opt for Data Center or Cloud.


author: B?nh DSnake
body: ![atl-bit.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/174410i86E2B23E162DA5B0/image-size/large?v=v2&px=999 "atl-bit.JPG")

I want to choose package user and buy with Server Bitbucket. but select hidden then click popup


Tags: bitbucket-server

server
image in bitbucket-pipelines.yml for Boost includes and libs
Asked by Sergey Kurchatov:

I cannot add Boost includes and libs into my pipeline

My **CMakeLists.txt** contains line

**find_package(boost_REQUIRED)**

It works in my local server but it does not work in the pipeline:

*Unable to find the Boost header files. Please set BOOST_ROOT to the root*   
*directory containing Boost or BOOST_INCLUDEDIR to the directory containing*   
*Boost's headers.*

My simplified **bitbucket-pipelines.yml** is below:

*image: zouzias/boost*   
*pipelines:*   
*default:*   
*- step:*   
*name: Build*   
*script:*   
*# Install Boost*   
*- docker pull zouzias/boost:latest*   
*# Call the CMake.*   
*- cmake ..*   
*services:*   
*- docker*

What is wrong?

Could you share a sample **bitbucket-pipelines.yml** and CMakeLists.txt that uses Boost includes and libs?

Thanks in advance

Sergey


Answers:
author: Jason McGuiness
body: I tried adding this to my ".yml" file:

```
 - step:
     name: Configure
     script:
        - apt update && apt -y install cmake libboost-dev && apt -y upgrade
```


Tags: bitbucket-pipelines

cloud
log4j update
Asked by mike:

/app/atlassian/bitbucket/7.4.2/app/WEB-INF/lib/log4j-api-2.11.1.jar  
/app/atlassian/bitbucket/7.4.2/app/WEB-INF/lib/log4j-to-slf4j-2.12.1.jar  
/app/atlassian/bitbucket/7.4.2/elasticsearch/lib/log4j-api-2.11.1.jar  
/app/atlassian/bitbucket/7.4.2/elasticsearch/lib/log4j-core-2.11.1.jar

Can I Update these log4j to an upper version like 2.16?


Answers:
author: Nic Brough -Adaptavist-
body: No, it could well break Bitbucket, and it would render you unsupported.

I'm assuming this is in response to the CVE - see <https://community.atlassian.com/t5/Trust-Security-articles/Atlassian-s-Response-to-Log4j-CVE-2021-44228> for the guidance on what to do.


author: Prabhu Ganesh
body: what will happen if we delete these log4j files?

comments: author: Nic Brough -Adaptavist-
body: Bitbucket will stop working.


author: Prabhu Ganesh
body: How to upgrade log4j files to the 2.16 version?


author: Nic Brough -Adaptavist-
body: You do not. You will need to upgrade your bitbucket


author: Prabhu Ganesh
body: In bamboo latest version also uses log4j 2.9.0 file, how to remediate this?


author: Nic Brough -Adaptavist-
body: Make sure none of the users can set up plans that could throw malicious code into the log file.


author: Prabhu Ganesh
body: Hi Nic - How to monitor these new plans? What is the solution for the long-term fix?


Tags: bitbucket-server

cve-2021-44228

server
Log4j
Asked by Tony Chhoeun:

I need some assistance on mitigating the Log4J file. I read the article and it says there's instruction but i am not sure how to proceed with the steps to mitigate. I did a search on the server and it is showing Log4J-core-2.11.1.jar.


Answers:
author: Jack Brickey
body: Hi Tony, if you are still stuck \& feel like you have already reviewed he Atlassian provided docs I would suggest you contact Atlassian Support directly.


Tags: bitbucket-server

confluence

server
BitBucket Server 5.x Cloud Migration
Asked by IT TGM:

Hi.

We are a very small internal dev team (Less than 5) and only use the BitBucket GIT services. We do not use or need to use and CD/CI facilities as this is an internal (non-productised) code base.

As such we have been very lax in keeping our on-prem BB Service to the latest release as the existing installation (v5.1.2) is stable and just chugs along doing what it needs to.

With the EOFL looming for Self managed BitBucket Server I have been contemplating a shift to the Cloud managed version.

However, the migration assistant requires that the installation is at least 7.0.

After reviewing the initial upgrade notes it seems to me that we could be in for a lengthy and problematic journey just to get to that point.

Is there a simple and straight-forward approach we could use to move our Projects and Repositories to the new Cloud Server without using the migration assistant?

For example could we simply clone out each repo to a local filestore and then push to a new remote host (ie. the new cloud server)?

We do not work very much within the GIT CLI and really use BitBucket as a way to ensure that the code base has a single point of truth that can be used by the other team members.

thank-you in advance


Answers:
author: Dave Theodore [Coyote Creek Consulting]
body: Simple answer is "no." If you don't care about the pull request history, it's not that hard to write a script to batch clone all your repos to a workstation, then batch push them in to Bitbucket Cloud. You will need to create the Projects and Repos in Bitbucket Cloud first, though. You will also need to merge or cancel any open pull requests in the repo. It gets messier if you are using LFS, but you essentially do those separately.

comments: author: IT TGM
body: Appreciate your reply. We actually don't have PRs at all. We are not that type of development environment. I can experiment with your suggestion. However, will the clone-push method carry over the change history, branches etc.?

thank you again


author: Ulrich Kuhnhardt _IzymesCo_
body: I second [@Dave Theodore \[Coyote Creek Consulting\]](/t5/user/viewprofilepage/user-id/853538) simple approach. Git is a DVCS and the local repository is an exact copy of the remote. The idea is to clone the full repository to a local machine, just like the codebase you'd be working on and then push it to a new (Bitbucket cloud) remote. Make sure you push with

git push -u \<bb_cloud_remote\> ---all

to get all branches across.


author: IT TGM
body: Thanks to you and [@Dave Theodore \[Coyote Creek Consulting\]](/t5/user/viewprofilepage/user-id/853538)

Will try this as I think in our case it is the most direct path.

Appreciate your time.


Tags: bitbucket-server

migration-customer-care

server
Why pipelines running time has increased for the same commit?
Asked by Daniel Simard:

I have this pipeline that ran on December 7th, 2021 for **\~20 minutes**:

![pipeline01.png](https://community.atlassian.com/t5/image/serverpage/image-id/174349iA715E9ECEC9E84CD/image-size/large?v=v2&px=999 "pipeline01.png")

We noticed a increase in build times so I ran the build on the same commit on December 15th, 2021 and it took **\~45 minutes**:

![pipeline02.png](https://community.atlassian.com/t5/image/serverpage/image-id/174350i43D0AA4E7B3BD093/image-size/large?v=v2&px=999 "pipeline02.png")

Then I ran the build on the same commit yesterday and it took **\~60 minutes**:

![pipeline03.png](https://community.atlassian.com/t5/image/serverpage/image-id/174351iBA3DF24CD34288FA/image-size/large?v=v2&px=999 "pipeline03.png")

Did you notice the same thing on your builds? What could cause that?


Answers:
author: Craig Castle-Mead
body: Hi [@Daniel Simard](/t5/user/viewprofilepage/user-id/4628588)

<https://jira.atlassian.com/browse/BCLOUD-15694> states a few possible reasons:

The two main contributors to build time variations on Pipelines are:

* External resources, like Docker images or dependencies that need to be downloaded from the internet. These sometimes vary a lot in how long they take to retrieve from external services.
* Variation in CPU availability in Pipelines. We run your builds as Docker containers in a cluster shared with other Bitbucket customers, so there can be CPU contention on our hosts during busy periods. Sometimes you get on a quiet node and your build executes quickly, other times it may have contention and complete more slowly.

On the latter, we're experimenting on ways to improve this while still allowing customers to get burst CPU usage when they need it. We're tracking this as [](https://jira.atlassian.com/browse/BCLOUD-13079)~~[BCLOUD-13079](https://jira.atlassian.com/browse/BCLOUD-13079)~~, so please watch that issue if you want to stay updated.

If your build process relies on third party services (package installers, rest APIs etc) then you also need to consider whether those dependent services are responding slower. I don't use Pipelines (not on Bitbucket cloud), but can you get more detailed logging on steps 2 and 3 - ideally with timestamps and see if there's a particular command that has increased and use that to continue your investigation?

CCM

comments: author: Daniel Simard
body: **External resources** in both builds took about 2 minutes, it wasn't that.

**Variation in CPU availability in Pipelines**. Build time was constantly higher for a couple of weeks. It's not like there was moments during the day that the builds were as fast as before.

**How it was solved.** Right now, it looks like we're back to our previous low build times of a month ago. I wrote to the billing department, maybe it was that. I'll reply here if we get back to high build times.


Tags: bitbucket-pipelines

cloud
Elasticsearch does not start when bitbucket version is udpated
Asked by Rohit Dalvi:

I updated bitbucket DC from 6.10 to 7.17.3. When I run

```
su stash /data/atlassian-bitbucket-7.17.3/bin/start-bitbucket.sh
```

The bitbucket service is started but the elasticsearch is not starting, I see below message during startup

```
Starting Atlassian Bitbucket as the current user

Starting bundled Elasticsearch
Hint: Run start-bitbucket.sh --no-search to skip starting Elasticsearch
could not find java in bundled jdk at /data/atlassian-bitbucket-7.17.3/elasticsearch/jdk/bin/jav
There was a problem starting bundled Elasticsearch

Starting Bitbucket webapp at http://localhost:7990
The Bitbucket webapp has been started.

If you cannot access Bitbucket within 3 minutes, or encounter other issues, check the troubleshooting guide at:
https://go.atlassian.com/bbs-troubleshooting-installations
```

I am wondering if I need to change or set java path again, I am using 1.8.0_202


Answers:
author: Rohit Dalvi
body: The new version of Bitbucket comes with the updated version of Elasticsearch and for that we had tell ES about the java path. I set up the java path like below and it started working.

```
export?JAVA_HOME=$(dirname?$(dirname?$(readlink?$(readlink?$(which?javac)))))source?~/.bashrcexport?PATH=$PATH:$JAVA_HOME/bin
```


Tags: bitbucket-server

server
How to Export single project from bitbucket
Asked by RichardA:

Hi Team,

Can anyone suggest me, How to export single project from Bitbucket.

I have searched in google, I found this [LINK](https://confluence.atlassian.com/bitbucketserver/exporting-957497835.html) . But I am not sure where we can execute this Rest API.

or if you have any other ways, Pls suggest.

Thanks.


Answers:
author: Dave Theodore [Coyote Creek Consulting]
body: You should be able to run the \`curl\` commands provided in the doc. This will require you to install \`jq\` as well, since the output is being piped to \`jq.\` Obviously, you will need to update the URL and provide login creds in the command line.

comments: author: RichardA
body: Hi [@Dave Theodore \[Coyote Creek Consulting\]](/t5/user/viewprofilepage/user-id/853538) Thanks for the reply. Its working as expected :)


author: Dave Theodore [Coyote Creek Consulting]
body: Great! Good luck!


Tags: bitbucket-server

server
I run tests on pipeline and get this error, I added the php memory limit variable, it did not help
Asked by Maksim Vasilevich:

![Screenshot - 2021-12-16T161435.199.png](https://community.atlassian.com/t5/image/serverpage/image-id/174272i4BD5B511AD426C51/image-size/large?v=v2&px=999 "Screenshot - 2021-12-16T161435.199.png")


Answers:
author: Syahrul
body: Hi [@Maksim Vasilevich](/t5/user/viewprofilepage/user-id/4676635) ,

Welcome to the community!

Could you share with me your pipeline YAML script so I can review your build, please make sure to remove any unnecessary information or mask it before sharing.

Meantime, are you using composer? If yes by default, the PHP memory value is 128M, but the composer heavily relies on PHP memory and it needs more than 128M memory.

A workaround on this issue is to raise the PHP memory usage, by adding this line to your build:

```
        script:          - echo 'memory_limit = 3000;' >> /usr/local/etc/php/conf.d/docker-php-ext-gd.ini
```

Let me know how it goes.

Cheers,  
Syahrul


Tags: bitbucket-pipelines