youngmon/atlassian-qna huggingface dataset:
I upgraded Bamboo, deleted a plan, recreated the plan, but the old build logs are getting in the way
Asked by Jay Barra:

I just upgraded from Bamboo 3.1.4 to 3.2, and it wasn't entirely smooth. But I got everything back up and running, agents re-added with the new jar file and all that.

For one of our builds I decided to redo from scratch since it didn't work that well and we aren't that far into it. I deleted the plan in Bamboo but when I recreated it using the same project key and build key I see the old build number in the status area of Bamboo.

How can I either clear all the history of the previous build or fix it so that I just continue from that number? In either case Bamboo just hangs there now and won't build.

I've already done a complete re-index of Bamboo and restarted it several times as well as creating and re-deleting that project several times already.


Answers:
author: Przemek Bruski
body: The deletion process is not immediate, can you check the log files that it has indeed started/finished and then recreate the plan?

comments: author: Jay Barra
body: That seems to be part of the problem, it's not deleting the build from the SQL DB it looks like. I'll have to figure out what I did during the upgrade.


author: Przemek Bruski
body: Or maybe it's [this bug](https://jira.atlassian.com/browse/BAM-9932)


Tags: log

upgrade
Commits back to 2020
Asked by Gustavo Rieper:

Good morning people

I'm facing a problem. I committed a change, following with  
Git Status  
Git add .  
Git commit -m "...."  
git pull origin master  
git push

And now on the gitbucket dashboard, under commits, it looks like the master is empty, and the last commit was made in 2020.

Through Git Status I can identify the gits performed hije, and last week, which shows that they still exist.

What should I do? Have you been through this?

Thanks.


Answers:
author: Gustavo Rieper
body: I managed to solve

I will leave what I did to help other people who may have the same problem.

I cloned the repository "Since the commits had apparently gone up", I made some change, and made another git, to go up the repository.

This brought git back to normal. And the commit listing went back to the current date.


Tags: bitbucket-cloud

cloud
Repository Size Warning, but wrong size
Asked by JonAM:

Hello,

My repository (/JonAM/lotr_client/) exceeded the 4 GB size limit. I followed the steps detailed here ([https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/\\](https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/)) to undo the last push, but I only managed to go from 4.4 GB to 4.09 GB and the repository is still locked. I reset my original branch to an even earlier commit, but the **remote** repo size is stuck at 4.09 GB.

git count-objects says I am under the 4 GB limit:  

\>git count-objects -Hv  
count: 258  
size: 340.09 MiB  
in-pack: 8319  
packs: 1  
size-pack: 3.96 GiB  
prune-packable: 0  
garbage: 0  
size-garbage: 0 bytes  

I have the Labs feature enabled for garbage collection, but maybe something went wrong and you need to run it for me?

Thanks!

Jon


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

I ran the GC against your repository and managed to reduce its size from 4.9 GB to 3.4 GB, which matches your local size.

Just to give you some context around the GC process, Bitbucket triggers a garbage collection on the repository after each push, however aggressive GC is triggered by GIT once the unreachable/dangling objects become older than 30 days.

For this reason, there is no need for us to trigger a manual GC for your repository. However, we are happy to run it for you if you feel there is a need.

We already have a feature request to allow users to mark repositories for git GC, as you can check here:

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

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

Please, feel free to share any additional questions regarding this case.

Kind regards,  
Caroline

comments: author: JonAM
body: Thank you so much, Caroline! You saved my day :-)


Tags: bitbucket-cloud

cloud
Can I access build environment on host with pipeline runner?
Asked by zcv:

Hi There,

I am testing the Bitbucket Pipeline Runner and want to be able to automate a build in an embedded arm dev Linux environment which hosts the runner. While I am very new to Docker, is it possible to run commands on the runner containers host?


Answers:
author: Rafael F_
body: You can do that using ansible.  

Add ansible to your builder image and it can then access any other linux.  

<https://medium.com/nonstopio/integrate-ansible-with-bitbucket-pipeline-4ae9821ce6fd>  

If there's a better way to do this I'd also like to know.

comments: author: zcv
body: Ah, yes a neat way of doing it. I have ended up going down the path of building a custom docker image and hosting it on Docker Hub. I'll see how this goes but not sure if it is the most effective method as I am pretty new to Docker. Spooling up a 1GB docker image for a build (compiling embedded firmware) just doesn't seem right but hey, that is how to cool kids do it these days?

Thanks for sending the link. I think I will use this method for actioning our Hardware-In-Loop test infrastructure though!


Tags: bitbucket-pipelines

cloud
a bug using SCP in pipelines
Asked by ????? ?????????:

Hello  
in pipelines i have following script:  

```
 - step:
  name: Deploy artifacts using SCP to STAGE
  deployment: staging
  script:
  - pipe: atlassian/scp-deploy:1.1.0
    variables:
      USER: bitbucket
      SERVER: x.x.x.x
      REMOTE_PATH: '<my path>'
      LOCAL_PATH: '<local path>'
```

i have atlassian/scp-deploy:1.1.0 downloaded properly, but BB thinks it's not OK and stops pipeline.  
![bb tech.png](/t5/image/serverpage/image-id/156085iECDF8696DAD1E97E/image-size/large?v=v2&px=999 "bb tech.png")What should i do to make it work?


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

Could you please add **DEBUG: 'true'** in the pipe variables, as follows:

```
- pipe: atlassian/scp-deploy:1.1.0
  variables:
    USER: bitbucket
    SERVER: x.x.x.x
    REMOTE_PATH: '<my path>'
    LOCAL_PATH: '<local path>'
    DEBUG: 'true'
```

and then copy-paste here the full output of the pipe (after you remove any sensitive/private info from the output), so we can have a look?

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

scp
How to anonymize the file contents inside a Repository in Bitbucket
Asked by Somenath.Chanda:

I am new to BitBucket \& I wish to **anonymize** the content of the files inside a Repository in BitBucket. Suppose there are hundreds of files in a repository and in each of the file, I want to **replace a phrase 'ABC Corp' with 'XXX XXXX'**. Is that possible ? Please note, I do not intend to manually change those files and perform COMMIT.

Thank You.

Somenath Chanda


Answers:
author: Ben
body: Hey Somenath,

While this isn't yet possible withion the Bitbucket Cloud UI - I have created a feature request to our development team to add this as a feature. Feel free to "Watch" this for future updates:  
<https://jira.atlassian.com/browse/BCLOUD-21770>

Cheers,

Ben (Bitbucket Cloud)


Tags: anonymous

bitbucket-cloud

cloud
How to restore previous bitbucket username
Asked by Himanshu Verma:

Hi team,

I had accidentally changed my bitucket username due to which I am not able to access repositories and Jenkins associated with that username. Please help to restore my previous bitbucket username.


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

In order to change your username in Bitbucket, you can follow the next steps:

1. Click on your avatar and select [**Personal settings**](https://bitbucket.org/account/settings/).

2. From the **Account settings** page, click **change** next to the **Username**.

3. Enter your new **Bitbucket username**.

4. Click **Change**.

In case you receive a message informing you that you can't use this username because "An account with that name already exists", you will need to use another username.

However, changing your username shouldn't impact your access to your repositories in Bitbucket. Could you confirm the steps you have followed to make this change, so I can further investigate what happened?

Please, feel free to share any additional questions regarding this subject.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
ServiceNow claims app password credentials lack write access
Asked by Andreas R?nning:

I've been using ServiceNow with a private BitBucket repo for a while now using app passwords with no issues. However, after upgrading ServiceNow to its latest version it's begun refusing me access to the repo using the same credentials that used to work fine, claiming the user lacks write privileges.

I'm not sure how they're poking at the repo to check for credential privileges but it clearly isn't working right. Is this a bitbucket thing or a ServiceNow thing?


Answers:
author: Nic Brough -Adaptavist-
body: If the upgrade of ServiceNow stopped something working, then yes, I'd be looking at the upgrade as the source of the problem, not the system that has not changed.


Tags: bitbucket-cloud

cloud

servicenow
Bitbucket Aws codeartifact pipeline
Asked by mohsin ijaz:

I am using the bitbucket pipeline to publish the artifacts to AWS code artifact, everything is running perfectly but 12 hours validity of the token needs me to update the password every time. Could anyone guide me on how I can automate this process?

Any help will be greatly appreciated.


Answers:
author: mohsin ijaz
body:     pipelines:  default:    - step:        name: test        image: atlassian/pipelines-awscli        script:           - export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID           - export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY           - export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION           - aws codeartifact get-authorization-token --domain XXXXX --domain-owner XXXXXx --query authorizationToken --output text > pass.txt           - value=$(<pass.txt)           - echo $value           - echo "export value=$value" set_env.sh           - printenv > set_env.sh         artifacts:           - set_env.sh                       - step:        name: maven        image: maven:3.8.1        caches:          - maven        script: # Modify the commands below to build your repository.                   - source set_env.sh          - echo $value          - sed -i 's/passwd12/'"$value"'/g' ./settings.xml          - cat settings.xml          - mvn clean deploy -s settings.xml -P snapshot


Tags: bitbucket-cloud

cloud
I am getting the following error: unable to look up cloversocial@bitbucket.org (port 9418) (nodename
Asked by James Anderbard:

I have been unable to push my changes up to my bitbucket repository and am getting the following error:

unable to look up cloversocial@bitbucket.org (port 9418) (nodename nor servname provided, or not known)

I get the same error when I try to do a basic clone of the repository, copying the text used by the repo clone function.


Answers:
author: James Anderbard
body: I get the same error when I try to do a basic clone of the repository, copying the text used by the repo clone function.

comments: author: Fernando De La Cruz Garelli
body: Hello James,

Can you confirm if you have setup a SSH key to the Bitbucket you are trying to connect to? Please refer to <https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/#SetupanSSHkey-ssh2SetupSSHonmacOS/Linux> if you have any questions on setting this up.


author: James Anderbard
body: That worked. Thanks for the help


Tags: bitbucket-cloud

cloud
Large repository
Asked by pingviek:

Hi! Can somebody help me with it - I got warning that repository size is 3.85 GB of 4 GB. But I can't find out why. All I found that 'git count-objects -vH' and 'size-pack' as output of it should show the exact size, but it shows size-pack: 317.97 MiB, not 3.85 GB from the warning. What am I doing wrong?


Answers:
author: Caroline R
body: Hi, [@pingviek](/t5/user/viewprofilepage/user-id/4515890),

I saw that you created a ticket with our support related to the same question, so to avoid any possible misunderstandings or miscommunication that may arise from discussing the same matter on two different platforms, let's focus on the ticket instead.

Once the ticket is resolved, feel free to share the resolution here to help other community members that may have the same issue.

Kind regards,  
Caroline


author: Fernando De La Cruz Garelli
body: Hello pingviek,

The following page provides a script to review large files in a repository as well as other options to review repository size usage:

<https://support.atlassian.com/bitbucket-cloud/docs/maintain-a-git-repository/>


Tags: bitbucket-cloud

cloud
Can i set twostep verification on multiple devices for the same bitbucket account?
Asked by Ashwani Kumar Yadav:

I sometimes has different devices(two to be exact) at different times, I need to use Microsoft's authenticator app on both of them for same bitbucket account, but I'm unable to do so. How can I do this?


Answers:
author: Caroline R
body: Hi, [@Ashwani Kumar Yadav](/t5/user/viewprofilepage/user-id/4476548)! Welcome to the community!

It's not possible to set the Two-step verification on different devices because, in order to set the 2sv linked to your Bitbucket, you will need to scan a code from your Bitbucket account, however, if you have already set a device, when you access the page to scan the code on Bitbucket, the system won't show you any code as you already have set this:

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

I hope this clarifies the situation, but please let me know if you have any questions.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
how to Trigger pipeline just in case the previous one is done
Asked by Jhonatan Teodoro:

Hi there, I want to know if is there a way to config the pipeline in order that a new trigger just is starts if the previous one was complete.  

e.g:  
commit send -\> pipeline trigged  
- commit send -\> wait the previous one finish -\> pipeline trigged


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

Yes, there is a way to config pipelines in order that a new trigger just starts if the previous one was completed :)

Basically, you can now [control the pipeline concurrency](https://confluence.atlassian.com/bitbucket/deployment-concurrency-control-946606813.html) using [Bitbucket deployments](https://confluence.atlassian.com/bitbucket/bitbucket-deployments-940695276.html).

By tracking your deployments using [Bitbucket Deployments](https://confluence.atlassian.com/bitbucket/bitbucket-deployments-940695276.html), Pipelines will automatically check if there is a deployment in progress before starting a new one to the same environment. If there is already a deployment in progress, later pipelines deploying to the same environment will be paused.

I hope this helps, but do let me know if you have any questions.

Kind regards,  
Caroline


Tags: bitbucket-pipelines

bitbucket-cloud

cloud
Re-use runner config (autoscaling)
Asked by Philipp Schmiedel:

When adding a new self-hosted runner, IDs and credentials are created that are specific for a single agent (e.g. the RUNNER_UUID parameter).

This makes it hard to auto-scale runners. If the parameters would be reusable it would be easier to automatically scale up on a high demand of runners and scale down if no agent is needed at the moment.

Do you have any suggestions on that topic?


Answers:
author: Pavel Shurikov
body: Please support this ticket <https://jira.atlassian.com/browse/BCLOUD-21304> as it should help address your question.


Tags: bitbucket-pipelines

bitbucket-runners
I am not able to generate pr though the commits are visible
Asked by Swatantra Saurabh:

I am trying to generate a pull request and all my commits are visible but as soon as i try to create a pr it shows

'We couldn't load the diff' {#toc-hId--1238041071}
--------------------------------------------------

and if i try to merge it without the diff

'Something went wrong while creating your pull request.'

message is coming?

please help


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

The "Something went wrong" message usually comes with a 5xx response that shows a Sentry ID code. This code may give us some indication of what is causing this issue. In this case, could you please follow the next steps to find the Sentry ID, so I can further investigate this case?

* Open the "Developer tools" in the browser you are using (click on the three dots \> More tools \> Developer Tools):

![devtools.png](https://community.atlassian.com/t5/image/serverpage/image-id/156360i46230166A3CC8DB3/image-dimensions/361x253?v=v2 "devtools.png")

* Then navigate to the Bitbucket page that gives you this error

* In "Developer tools", select the **Network** tab

* Find and select the request that gives a 5xx response

* In the **Headers** panel (after you select the request with 5xx response), check if there is a field named **sentry id**.

* If you can provide us the value of that field, I can look it up in our system for further info.

Thank you.

Kind regards,  
Caroline

comments: author: Swatantra Saurabh
body: ba3f8090bb964193b819239164503ec8 is my sentry id


author: Theodora Boudale
body: Hi [@Swatantra Saurabh](/t5/user/viewprofilepage/user-id/4514410),

Please allow me to step in as Caroline is out of office.

Thank you for the sentry id. I checked it in our system and the error message is "NotFoundError".

Could you please double-check and let me know if the source branch of the PR exists in your repo, and if the destination branch also exists in the repo where you are opening the PR?  

This issue may also occur if the pull request has a reference to a commit that no longer exists, e.g. as a result of rewriting history. Is it ok if I run a git gc on both repos (your own and the target repo)? This has often solved issues with the same error.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Push docker image to private registry (ACR): "Your password will be stored unencrypted"
Asked by koanplaned:

Hi all,

I'm using bitbucket pipeline to build and push images to a private Docker registry (ACR):

```
- echo ${AZURE_PASSWORD} | docker login $AZURE_ACR_URL --username "$AZURE_APP_ID" --password-stdin 
- docker push "${IMAGE}:${VERSION}"
```

It is working, but there is following statement shown in the logs:

```
WARNING! Your password will be stored unencrypted in /root/.docker/config.json. 
Configure a credential helper to remove this warning. 
See https://docs.docker.com/engine/reference/commandline/login/#credentials-store
```

I'm using the standard Atlassian template for the docker registry login and I'm wondering, if the whole process is secure?

Or is it not relevant, because the credentials are just stored temporarly unencrypted within the runtime container of the building step and after the execution, the container shuts down and credentials are gone anyway?

Thanks for any feedback :)


Answers:
author: Mark C
body: Hi [@koanplaned](/t5/user/viewprofilepage/user-id/4514093) ,

Welcome to the Community.

This is actually the default behavior where Docker stores the login password unencrypted in /root/.docker/config.json.

That's correct. Pipelines stores your credential temporarily within the runtime container/pod when you build a step.  
However, after the execution, the container/pod will be shut down along with your stored credentials.

As a good practice, just always make sure you're using secured environment variables for your credentials.  
This way, your credentials will not be visible on Pipelines UI logs.

Do let me if you have further questions that I can help with.

Regards,  
Mark C

comments: author: koanplaned
body: Hi [@Mark C](/t5/user/viewprofilepage/user-id/1210823)

thank you very much for your answer, that helped me to understand the whole process.


author: Bo Christensen
body: Hi [koanplaned](https://community.atlassian.com/t5/user/viewprofilepage/user-id/4514093), I know this is an old thread, but any pointers you could give me about using ACR for building and storing my image using 'bitbucket-pipelines.yml'

Regards

Bo Christensen


Tags: bitbucket-cloud

cloud
Need GC on remote
Asked by adrianklimczak:

Please run garbage collection on our Survival Defender repository.

We have trimmed old history to reduce the repository size and did  
$ git push --all --force

Size of the repository on BitBucket is 1.89 GB, while the actual size is much smaller:  
$ git count-objects -v  
count: 0  
size: 0  
in-pack: 47156  
packs: 1  
size-pack: 990471  
prune-packable: 0  
garbage: 0  
size-garbage: 0


Answers:
author: Caroline R
body: Hi, [@adrianklimczak](/t5/user/viewprofilepage/user-id/987204),

Thank you for reaching out to Atlassian Community!

I ran the GC against your repository and managed to reduce its size.

To give you some context around the git GC process, Bitbucket triggers a garbage collection on the repository after each push, however aggressive GC is triggered by GIT once the unreachable/dangling objects become older than 30 days.

For this reason, there is no need for us to trigger a manual GC for your repository. However, we are happy to run it for you if you feel there is a need.

We already have a feature request to allow users to mark repositories for git GC, as you can check here:

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

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

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

Kind regards,  
Caroline

comments: author: Gabriel Hillesheim da Silva
body: Hy, I ran BFG over my repo, push all the files I've cloned with '--mirror', when I type

"git count-objects -v" I get this

count: 3  
size: 3  
in-pack: 1607  
packs: 1  
size-pack: 68472  
prune-packable: 0  
garbage: 0  
size-garbage: 0

But in BitBucket size information still warning me about the size.

'\<Repo name\>' is repo name

Can you take a look?


author: Nic Brough -Adaptavist-
body: You'll need to talk to your administrators about this, we have less access to, or knowledge of, that system than you do.


Tags: bitbucket-cloud

cloud
Does Source Tree Support Repack or Garbage Collect commands with GIT
Asked by mlevison:

Source tree is proving adept at helping manage my business files. As it happens many of these are binaries (thanks MS Word, IPages, etc) and as result my repository is growing by leaps and bounds.

Is there anyway to use SourceTree to force a repack and garbage collect every so often? I don't mind running the command manually since it will be pretty rare.

Cheers

Mark


Answers:
author: stevestreeting
body: There's no in-built function for this because git does it itself periodically.

If you did want to do it manually, you could define a Custom Action which runs these commands if you wanted (see Preferences \> Custom Actions)

comments: author: mlevison
body: Coolness I seem to remember ancient history when GIT didn't do this automatically. Perfect.

Cheers

Mark