youngmon/atlassian-qna huggingface dataset:
Why my account have two two-factor verification page?
Asked by Ron Mart Daniel R. Javier:

I login my bitbucket account and provided the two-factor verification code but the page redirect me to another two-factor verification page and the code I got from the authy is not working anymore.


Answers:
author: Theodora Boudale
body: Hi [@Ron Mart Daniel R. Javier](/t5/user/viewprofilepage/user-id/5399366) and welcome to the community!

Bitbucket Cloud uses Atlassian accounts (the ones for <https://id.atlassian.com/>) for authentication.

At the moment, it is possible to set up 2FA both for a Bitbucket account and also for an Atlassian account (this is because Bitbucket already had an existing 2FA implementation before it was integrated with Atlassian accounts).

If you do that, you'll get asked for a 2FA code twice when logging in to Bitbucket, once for the Atlassian account and once for the Bitbucket account.

There should be two separate entries/accounts in the authenticator app on your phone, one for the Atlassian account and one for the Bitbucket one. The 2FA codes for one account will not work for the other account.

Based on your description, it sounds like 2FA may be enabled for both accounts. If you don't have two separate entries/accounts in the authenticator app for Atlassian and Bitbucket, but only one for Atlassian, you can disable Bitbucket 2FA (there is a link in the 2FA page **Forgot code?** that you can use to request a 2FA recovery email).

After you get access, Atlassian account 2FA can be enabled and disabled on this page:

* <https://id.atlassian.com/manage-profile/security>.

Bitbucket Cloud 2FA can be enabled and disabled on this page:

* <https://bitbucket.org/account/settings/two-step-verification/manage>

Please feel free to reach out if you have any questions.

Kind regards,  
Theodora


author: Carlos Garcia Navarro
body: Hi [@Ron Mart Daniel R. Javier](/t5/user/viewprofilepage/user-id/5399366) ,

Welcome to the Community! Was it working as you expected before and stopped working? Have you read this document? It has some information about how to set up and troubleshoot two-step verification:

<https://support.atlassian.com/bitbucket-cloud/docs/enable-two-step-verification/>

comments: author: Ron Mart Daniel R. Javier
body: HI [@Carlos Garcia Navarro](/t5/user/viewprofilepage/user-id/1031232) , thank you for your response,

No, actually, this is the first time I set it up as my company requires us to have two-step verification enabled.

Yes, I read the link that you provided, can't follow everything as some of it is different from my setting like the UI and labels are different.

I tried to disable the two-step verification but for some reason it always make me setup a new one.


Tags: bitbucket-cloud

cloud
How can I extend my Bitbucket on premise license as I have not completed my cloud migration?
Asked by T473413:

I received notice today that my on-premise license will expire January 18, and I have not completed my migration to the cloud version. What are my options as I will not complete migration by January 18?


Answers:
author: Aron Gombas _Midori_
body: If "on premise" means Bitbucket Server, then you can continue using that forever. You will not be able to upgrade to a newer version or receive support, but your Bitbucket Server will continue working after mid February.

And you can easily move to Bitbucket Data Center, as it is nearly identical with Server, but it remains supported! It can give you some extra runway, even if you plan to move to the Cloud finally.


Tags: bitbucket-server

server
Unable to create default branch during repository creation with branch permissions
Asked by Lee Hull:

We have global branch permission setup on the project to ensure developers/admin is not checking directly to master

* Branch: master
* Write Access: None
* Merge via Pull Request: Admin

The issue is, when we created a new repository or if a developer creates a new repository, its missing the default branch and they cannot create it, how is this expected to work?

They can create other branches but "master" is missing, so they wouldn't be able to create a pull request for that


Answers:
author: Syahrul
body: G'day, [@Lee Hull](/t5/user/viewprofilepage/user-id/959737)

Based on your description, the behavior you're encountering appears to be expected, as you've set the **master** branch permission in your project to '**none** .' Consequently, when a user creates a repository within the project that includes a **master** branch, the restrictions will be **enforced**, possibly resulting in the absence of the branch.

We currently have a feature request to permit branch creation even with branch restrictions applied in project settings, which you can view here: <https://jira.atlassian.com/browse/BCLOUD-22710>

In the meantime, a possible workaround is to include a Workspace/Project admin in the project branch restrictions. This would allow for the creation of a repository with a master branch.

Regards,  
Syahrul

comments: author: Lee Hull
body: Thanks,

The issue is, we are allowing developers and myself to be able to create repositories, but we have to bypass the entire branch permission or add ourselves to "check in without a PR" which is a violation of our audit policy.

Our audit policy requires a PR before making any changes but in order to follow that, we have to temporarily add a bypass in the branch permissions before creating the repository, that process is currently very inconvenient as we have to request the changes from our administration


author: Syahrul
body: Hi [@Lee Hull](/t5/user/viewprofilepage/user-id/959737)

Thank you for providing more details. I recommend adding comments to the feature request about your specific use case. This will increase its visibility with our project team.

Additionally, you may want to consider an alternative approach. You can initially create a repository in a different project and then transfer it to the project with the branch restriction. This method circumvents the need to modify the rules each time you need to create a new repository, serving as a temporary solution.

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud
/opt/atlassian/pipelines/agent/build does not exist
Asked by Zafer Uzun:

Hi all,   

I get this error while running an ECR push pipe  

\`\`\`   
bash: --volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build: No such file or directory  
\`\`\`   

Does anyone have any suggestion please?   

ps: I run this pipe for production branch, when I run it for staging it is working properly.  


Answers:
author: Mark C
body: Hi [@Zafer Uzun](/t5/user/viewprofilepage/user-id/5399010),

Welcome to the community.

For the Pipes script you're using, you can add the variable below to get more information about the issue if you haven't done it.

```
DEBUG: 'true'
```

I'd also suggest adding the command below before running the Pipes script to check the current Docker image you're trying to push.

```
docker images
```

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
How to Simulate Docker ?
Asked by xicond:

I have docker mysql run manually inside pipeline step  

How can I simulate that in local ?  

<br />

\`\`\`  
dusk:  
- step:  
name: Test  
image: xicond/bitbucket-pipeline:74  
script:  
- docker run --name mysql -v $BITBUCKET_CLONE_DIR/laradock/mysql/conf.d:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=$DB_PASSWORD -e MYSQL_PASSWORD=$DB_PASSWORD -e MYSQL_DATABASE=$DB_DATABASE -dip 3306:3306 mysql:5.7 # json support + oracle 122.43 MB Assuming your configuration is located in /mysql/conf.d in your repository  
- apk add wget; wget --retry-connrefused --tries=100 -q --wait=1 --spider localhost:3306  
- COMPOSER_POOL_OPTIMIZER=2 COMPOSER_ALLOW_SUPERUSER=1 composer install
caches:  
- vendor  
services:  
- docker  
\`\`\`


Answers:
author: Syahrul
body: Hey [@xicond](/t5/user/viewprofilepage/user-id/16360)

By local, do you mean running the steps below on your local machine? If yes, please check our KB below, which outlines the steps to reproduce the issue locally in the pipeline. It should be similar to what you wish:

[Troubleshoot failed Bitbucket Pipelines locally with Docker](https://confluence.atlassian.com/bbkb/troubleshoot-failed-bitbucket-pipelines-locally-with-docker-1318882094.html)

Regards,  
Syahrul


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Cannot log in to bitbucket - Error message "We couldn't log you in"
Asked by Project V_G:

Hi, i have a problem with my bitbucket account, i can't log in from any browser. I tried Chrome, Firefox and Safari, but every browser return this message error:

"You may run into this issue when you use specific browsers or add-ons that hide the referer header for id.atlassian.com and other Atlassian sites. Check for these and then try logging in again."

So after this, i also tried to remove every add-ons in my browser, clear the browser cache, usign the browser in incognito/private mode, reset the password, but the result was always the same with the same error.

I also tried some solutions that i find online and in the community, but none of those works.

How can I proceed to log in?

Thanks!


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

Your Bitbucket Cloud account was in a dormant state, which is the reason for the error you were seeing.

I went ahead and reactivated it. Could you please try logging in when you have some time and let me know if it works?

Kind regards,  
Theodora


author: Moses Thomas
body: Hello,

May be you account is inactive can you ask your admin to check that?

KS

Mo


Tags: unknown-hosting-type
Bitbucket "We couldn't log you in"
Asked by Ben:

I can't log in to Bitbucket (though I can log in to this Atlassian forum), and a quick Google showed me this post:

<https://community.atlassian.com/t5/Bitbucket-questions/Unable-to-login-Bitbucket-We-couldn-t-log-you-in/qaq-p/1896018>

I'm creating a new question here, as recommended. Has my account been labelled inactive?


Answers:
author: Ben
body: Hi [@Ben](/t5/user/viewprofilepage/user-id/5398809)

I've just reactivated your account, it was marked DORMANT as it had not been logged into since 2018.

Please try logging in again :)

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
??????????????????
Asked by ?? ??:

Migration assistant ?????????????????? {#toc-hId--407949644}
------------------------------------------------------------

java.lang.NullPointerException: null cannot be cast to non-null type kotlin.String

?????????????????


Answers:
author: Chung Jeon
body: ?? ??

???[@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) ???????????????????????????????????????????????????????

??????????????????????????????????????????????????

???????????


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

I see that you created a support ticket for this issue as well and one of our engineers is working with you on this ticket.

Once the issue is resolved, please feel free to post the resolution here for any other users who may come across this issue.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
I gave someone Write Level access to my repository workspace. It is now empty. How do I retrieve?
Asked by aboodram:


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

When you say that the repo is empty, does this mean that the repo exists but commits from the repo were deleted?

Did this developer do a force push? This is an action that can result in loss of commits (it can be prevented in the future by creating a branch restriction with the option **Allow rewriting branch history** disabled).

Do you or any other developer have a clone of the repo on your machines or another server? If so, you can push from that clone to the Bitbucket repo.

Kind regards,  
Theodora


author: Charlie Misonne
body: Hi!

What is your question exactly?

You can use the *git clone*command to clone your repository locally but I'm not sure if that's what you're looking for?


Tags: unknown-hosting-type
Does running pipelines in parallel consume the sum of their execution time?
Asked by Ian Liu Rodrigues:

I've looked in the Parallel steps documentation but couldn't find anything. My question is how parallel steps are billed.

Are all parallel steps execution time summed? Or is it just the total pipeline execution time?


Answers:
author: Ben
body: Hi Ian,

You are correct - each parallel step contributes separately to the total build execution time even though they are running simultaneously.

When hovering the mouse over the total build time, it will state that parallel steps may be contributing to increased build time when these are used.

Was there anything else you needed clarification on? :)

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-pipelines
Unable to login to Bitbucket
Asked by Emiliano Estevez:

Hello, I'm using Chrome in Mac and I'm getting the following error when I'm doing the login

You may run into this issue when you use specific browsers or add-ons that hide the referer header for id.atlassian.com and other Atlassian sites. Check for these and then try logging in again.  

I delete cache, etc and it doesnt work

can you help me please?

thanks


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

Your Bitbucket Cloud account was in a dormant state, which is the reason for the error you were seeing.

I went ahead and reactivated it. Could you please try logging in when you have some time and let me know if it works?

Kind regards,  
Theodora

comments: author: Emiliano Estevez
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) seems my account is working fine now. Thanks!!


author: Theodora Boudale
body: That's good to hear and you are very welcome.

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


author: Laurie Sciutti
body: Hi [@Emiliano Estevez](/t5/user/viewprofilepage/user-id/5398393) and welcome to the Community! In addition to the suggestions from [@Rafael Osipov](/t5/user/viewprofilepage/user-id/2163288), there seems to be a lot of additional information/questions about the same issue [here](https://www.google.com/search?q=You+may+run+into+this+issue+when+you+use+specific+browsers+or+add-ons+that+hide+the+referer+header+for+id.atlassian.com+and+other+Atlassian+sites.+Check+for+these+and+then+try+logging+in+again.&rlz=1C1GCEA_enUS915US915&oq=You+may+run+into+this+issue+when+you+use+specific+browsers+or+add-ons+that+hide+the+referer+header+for+id.atlassian.com+and+other+Atlassian+sites.+Check+for+these+and+then+try+logging+in+again.&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBBzYyNmowajeoAgCwAgA&sourceid=chrome&ie=UTF-8). One is to delete your cookies but another is due to account issues which may require assistance from Support. HTH

comments: author: Emiliano Estevez
body: the weird thing, my credentials works fine in jira, community but doesnt work in bitbucket. I already clean the cache, use incognito windows but I'm still facing the issue


author: Rafael Osipov
body: 1. Try to login from incognito page

2. Consider [resetting your Chrome browser to the factory defaults](https://support.google.com/chrome/answer/3296214?hl=en)

comments: author: Emiliano Estevez
body: dont work :(


author: Rafael Osipov
body: What if you click on "Forgot password" upon logging in to Bitbucket and reset the password to the same as you are using for logging in to JIRA?


author: Emiliano Estevez
body: dont work


Tags: bitbucket-cloud

cloud
Merge cache from multiple steps
Asked by Ian Liu Rodrigues:

If I have two consecutive steps using the same cache, for example, \`pip\`. Will the caches be merged? Is it possible to merge the same cache from multiple steps?


Answers:
author: Syahrul
body: G'day, [@Ian Liu Rodrigues](/t5/user/viewprofilepage/user-id/5394057)

I believe merging the same cache from multiple steps is impossible as the cache is created when steps succeed. However, you might want to look into the Smart caches that we just released last year:

[Announcing smarter caches in Bitbucket Pipelines](https://bitbucket.org/blog/announcing-smarter-caches-bitbucket-pipelines)
> Cache keys provide a way to uniquely identify versions of a cache based on a set of files in your repository. The typical use case would be to define a cache key based on files that define a project's dependencies. When dependencies are updated, the hash of the key files also updates and Pipelines will be able to generate a unique cache version for subsequent builds. As multiple cache versions are able to be retained, future builds using either the old or new dependency set will have a unique cache version to reuse.

I hope this helps.

Regards,  
Syahrul

comments: author: Ian Liu Rodrigues
body: Hi [@Syahrul](/t5/user/viewprofilepage/user-id/744536) , thanks for the reply!

I've read the documentation page you've linked, and I think it wouldn't solve this issue.

I guess the best term here isn't "merging caches", but a "global cache", that is updated on every step if the contents of the cache directory changes between steps.

For example, consider the following scenario:

**Step 1** only installs linting tools, so the pipeline fails as fast as possible in case of a lint error, and caches the pip packages to speedup even further.

**Step 2** installs build dependencies, which also caches in the pip cache, but this will not work because now the cache only contains the linting tools. I think Smart caches can't solve this either, since my requirements.txt file didn't change here.

I guess I could define multiple caches for each step, but this gets really cumbersome, and the same packages would be cached multiple times.

To overcome this difficulty, all my bitbucket pipelines are now a single step.


Tags: bitbucket-pipelines
Do we have a way to give input parameters before running bitbucket pipeline from console ui?
Asked by Hareesh Kanchala:

Hi,

I am looking for a Jenkins or Azure Pipelines like solution where I need to give parameters values and run the pipeline. Bitbucket pipeline should take those values and run the pipeline steps.

I come across Workspace variables, Repository variables and Deployment variables which are not useful in my case. I can't go to these variables for each deployment and give the build number for my dev deployment.

Please suggest if there is any alternative approach where I can mention the parameters before pipeline run like this.

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

Regards,

Hareesh


Answers:
author: Theodora Boudale
body: Hi Hareesh,

This is possible with custom pipelines. Custom pipelines do not run automatically on every push. They can be triggered manually from the UI (like in your screenshot) and you can include in their definition variables that you provide at run-time.

You can check our documentation on custom pipelines with variables here (an example is also included):

* <https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/#Custom--manual--pipeline-variables>

Please feel free to reach out if you have any questions!

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
[Bitbuckt Pipeline]after-scripts not executed when scripts timeout
Asked by Weihan Li:

\[Bitbuckt Pipeline\]

The after-scripts not executed when pipeline timeout

What should we do if we want to send a failed message when the pipeline timeout?


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

The after-script is part of a step, so if the step times out before it gets to the after-script then the after-script won't get executed. I'm afraid that there is no way to work around this behavior.

If you have manually set the **max-time** for a step or all steps, you can try increasing it so that the step has more time to complete and the after-script gets executed. If you have not set a max-time and the step takes more than 120 minutes, then there is no way to execute anything after 120 minutes.

We have feature requests for the ability to extend Pipelines execution time for Cloud and self-hosted runners that you can vote for (if you'd be interested in that feature):

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

Kind regards,  
Theodora


author: Leo Charlie
body: To handle timeouts in Bitbucket Pipelines, add an \`after-script\` section in your \`bitbucket-pipelines.yml\` file. Use conditional statements to check for timeouts (commonly exit code 143) and execute actions accordingly. For example, you can send a failed message using a tool like \`curl\` to a notification service. Adjust the script based on your specific needs and timeout exit code.


Tags: bitbucket-cloud

cloud
XML Artifact incorrect
Asked by Emre Can Vural:

greetings,  
I upload an xml file to the artifact side and it reduces the original size of the xml file from 600kb to 120kb and distorts the xml structure.  
How can I fix this.?


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

I'm not sure what you are referring to by 'artifact side'. Could you please clarify, are you uploading this file to the **Downloads** page of the repo, or are using Bitbucket Pipelines and you are referring to a [Pipelines artifact](https://support.atlassian.com/bitbucket-cloud/docs/use-artifacts-in-steps/) produced by a build step?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Removal of sensitive data from previous commits
Asked by raghavan21_2000:

Hello everyone, I need help to remove sensitive info which is been committed in a repo. I've removed those credentials in the latest commit, but still, in previous commit histories I can view it, can anyone suggest how can I remove the same? (If it's possible to remove)  

<br />


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

You can use BFG repo cleaner to rewrite history in older commits and remove sensitive info.

This is the website of the BFG tool:

* <https://rtyley.github.io/bfg-repo-cleaner/>

You can also check the following reply in a StackOverflow post that was made by the author of BFG:

* <https://stackoverflow.com/a/15730571>

Before you use this tool, please ensure you take a backup of your repo in case anything goes wrong.

After you make changes with BFG, I would also suggest pushing first to another newly created empty repo so you can inspect if the changes look ok (you can delete this extra repo afterwards if you no longer need it). If everything looks ok, then push to your existing repo.

When you push to your existing repo, please let me know and I can run a garbage collection in order to remove the dangling commits from the remote repo.

Please feel free to reach out if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud