youngmon/atlassian-qna huggingface dataset:
Managing transactional Email Templates
Asked by Alexander Golovtchiner:

Hi there,

just to clarify from the top, i am not talking about Jira emails, or any other Atlassian Emails to Atlassian customers/users.

We've got a CMS that triggers certain Emails, e.g. password reset or account creation, those emails are in html format inside a Bitbucket repostiory, alongside a json file, plain-text txt file and an image folder.

Now this was okay for most cases, but its nowhere near scalable: now for example, i got a customer with 6 different email templates, wich he had translated in 10 languages. so now i am looking at 60 email templates that i would have to create, and then keep updated. And doing that inside of Bitbucket would be great, but changing the wording or layout would mean to manually edit each html code...

So my Question would be: is there some sort of Atlassian Plugin/Addon or whatever, that would gibe me much needed functions of a product like mailersend, mailchimp, mailgun or sendgrid? *And again, i am not talking about the templates for Jira triggered Emails or Jira Tasks or anything like that*

Any help or advice would be immensely appreciated!


Answers:
author: Patrik S
body: Hello [@Alexander Golovtchiner](/t5/user/viewprofilepage/user-id/4992434) ,

Welcome to Atlassian Community!

I'm afraid that Atlassian does not have a Bitbucket plugin specifically to manage the use-case of managing e-mails. I also tried to search for third-party plugins for Bitbucket Cloud in[Atlassian Marketplace](https://marketplace.atlassian.com/search?hosting=cloud&product=bitbucket), but didn't find anything specific for your use case.

As Bitbucket is a source code repository, we currently don't have a feature specific for managing/versioning e-mail templates, and in case you want to continue using a git repository to store the e-mail templates, you would indeed have to manually change each of the templates. Since your use case is very specific to managing e-mails/templates, I would suggest exploring other solutions/products specifically developed for that porpoise, such as the ones you have listed in the description.

Thank you, [@Alexander Golovtchiner](/t5/user/viewprofilepage/user-id/4992434) .

Kind regards,

Patrik S

comments: author: Alexander Golovtchiner
body: thank you lots for the answer. i also checked the marketplace before i came here so i already had a feeling this would be the case, i just had to make sure.

but its nice to at least have a definitive answer to this question, so thanks again!


Tags: cloud

email

template
All users unable to git clone or push. Fails with "fatal: Authentication failed for"
Asked by Robert du Toit:

Just recently started running into this issue on our local Bitbucket server instance. None of our users are able to clone/pull from any of our repositories. It pops up an Atlassian authentication dialog which does not authenticate the user correctly resulting in a "fatal: Authentication failed for" error. Following the "Can't log in?" button on this login screen directs us to the Bitbucket cloud login, which makes no sense as this is our own Bitbucket server instance.

Neither SSH or HTTPS works. Not in Visual Studio, Sourcetree or git console either. The only way we have somehow been able to clone any repository is via Github's import repository option, which was successful in importing our repository.

All the users are able to successfully log into bitbucket via the web interface. They are able to create branches, commit code and create pull requests from here.

Any assistance with solving this issue would be greatly appreciated.


Answers:
author: Aidan Dauphin
body: I am having this exact error, was this ever resolved?


Tags: bitbucket-server

server
Limitations quarkus native compilation
Asked by Francisco Gil A:

I am writing this post to see what configuration would be best for our native Quarkus builds. As I have seen in other posts, I need a lot of RAM, so I am trying to configure the step with 8GB (2x) and applying a 5g configuration when compiling natively (now I have it at 4g -Dquarkus.native.native-image-xmx=4g because otherwise it fails). Thank you very much

```

image: atlassian/default-image:2

options:
  max-time: 20

definitions:
  steps:
    - step: &build-docker
        max-time: 25
        image: quay.io/quarkus/ubi-quarkus-native-image:22.0.0-java11
        name: Build Docker Image
        script:
          - ./mvnw package -Pnative -Dmaven.test.skip -Dquarkus.native.native-image-xmx=4g
          - docker build -f src/main/docker/Dockerfile.native -t ****:$BITBUCKET_BUILD_NUMBER .
          - docker save --output ****.docker ****:$BITBUCKET_BUILD_NUMBER
        artifacts:
          - ****.docker
        services:
          - docker
        size: 2x
        caches:
          - docker
    - step: &push-docker-pre
        max-time: 10
        image: google/cloud-sdk:382.0.0
        name: Push Docker Image
        script:
          - ENVIRONMENT="pre"
          - GOOGLE_PROJECT_ID="****-pre"
          - docker load --input ./****.docker
          - ****
          - ****
        services:
          - docker
        size: 2x
        caches:
          - docker
pipelines:
  branches:
    develop:
      - step: *build-docker
      - step: *push-docker-pre
  default:
    - step: *build-docker
```


Answers:
author: Patrik S
body: Hello [@Francisco Gil A](/t5/user/viewprofilepage/user-id/4992162) ,

Welcome to Atlassian Community!

I can't tell specifically for Quarkus what are the memory requirements, but with respect to pipelines, when running your builds in bitbucket pipelines infrastructure each step will run in a separate container that has 4 GB of memory available, and this can be increased to 8GB by using the [size: 2x](https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/#size) attribute when defining the step.

In case you need more than 8GB of memory, you have the option to run your build in your own infrastructure by using [self-hosted runners](https://support.atlassian.com/bitbucket-cloud/docs/runners/). With runners you can configure the step size to be 2x (8GB), 4x (16GB), and up to 8x (32GB). Please note that the machine where you are executing the runner needs to have this memory available to be used. Also, since runners run in your own infrastructure, the steps that use runners will not be counted against your build minutes quota.

Hope that helps to clarify your questions!

Thank you, [@Francisco Gil A](/t5/user/viewprofilepage/user-id/4992162) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud
Pipelines - Use list to loop in multiple scripts/steps
Asked by shall:

In my bitbucket pipeline, in multiple steps and scripts, I want to loop through a common list of strings.

Azure Pipelines shows an example of how to do this in the "Loop through parameters section": [https://docs.microsoft.com/en-us/azure/devops/pipelines/process/runtime-parameters?view=azure-devops\&tabs=script](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/runtime-parameters?view=azure-devops&tabs=script)

However this syntax is not valid according to the bitbucket-pipelines.yml validator tool: <https://bitbucket-pipelines.atlassian.io/validator>

How can I do this in Bitbucket Pipelines?

Bonus points if I can do this within a script, as opposed to at the step level.

An example of what I would like to do:

```
parameters:
- name: myList
  type: object
  default: 
  - listString1 
  - listString2

pipelines:
  default:
    - step:
    - ${{ each exampleString in parameters.myList }}:
        - script: echo ${{ exampleString }}
```


Answers:
author: shall
body: I found a similar concept here: <https://community.atlassian.com/t5/Bitbucket-questions/Array-value-on-Environment-Variables-for-BitBucket-Pipelines/qaq-p/875894>

It uses repository or workspace pipeline variables as an array, which you can then loop through in your bitbucket-pipeline.yml. So this technically works as a solution.

However, I'd have preferred a way to do this inside the yml file as opposed to in Bitbucket settings, since now those variables are not tracked in git, although they can be visible in pipeline logs.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Request for garbage collection
Asked by rob huether:

Hello!

I saw other posts requesting this and it seems it had to be done by administrators through this forum. I didn't see any answers that allowed the repository admins to do it themselves.

We pushed a massive change to our repository and it is now over the limit. I created a remote branch on the commit before this push and completely deleted that master branch and made the new branch the main development branch. I see only the one branch and only the good commits. However, it still says the repository size is \~7 GB.

I have only one repository in my account but, if needed, the last two letters are 'er' and the main branch is called 'beforeBinaries'.

Can someone run the garbage collection for me?


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

I ran a git gc for your repo and its size is 1.7 GB now.

Does this agree with the size of your local repo if you run **git count-objects -Hv** ?

Please feel free to let me know if the issue is resolved and if you need anything further!

Kind regards,  
Theodora

comments: author: rob huether
body: Thanks! I can now push things to the repository. Sorry to bother you with such a trivial thing but thank you for running the command.

I get this now but I think we're all good:

count: 607  
size: 5.23 MiB  
in-pack: 12756  
packs: 2  
size-pack: 4.87 GiB  
prune-packable: 5  
garbage: 0  
size-garbage: 0 bytes


author: rob huether
body: Oh, I forgot to mention: I did turn on the garbage collection setting in Labs.


Tags: bitbucket-cloud

cloud
Pull Request URL Linked to Old On Prem JIRA Server after Syncing to JIRA Cloud
Asked by Herb Salgado:

Hello,

We just synced JIRA Cloud to Bitbucket and the Pull Request URL's are still linked to the Old On Prem JIRA Server vs the Cloud issues. Our migration from JIRA on prem to cloud was successful.

How do I update the urls in Bitbucket to reflect the .atlassian.net issues vs on prem?

Confirmed in Atlassian Integrations that the correct Jira Site is synced .atlassian.net

Thank you for your help


Answers:
author: Syahrul
body: Hey [@Herb Salgado](/t5/user/viewprofilepage/user-id/4991673)

G'day!

I believe you still have the old integration in your Bitbucket Workspace; hence it's still linked with your old Jira server.

Can you navigate to the **Workspace settings** \> **Installed Apps**?

Search for **Jira** and click the "\>" button to locate your old Jira URL, as an example screenshot below:

![Screenshot 2022-07-25 at 1.39.17 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/207585i1A8E6F599F2C7303/image-size/large?v=v2&px=999 "Screenshot 2022-07-25 at 1.39.17 PM.png")

If the URL shows your Jira OnPrem URL, you can click **Remove** to remove the integration, which should unlink your old Jira server. Once removed, it should re-link the Jira Issue key with your Jira cloud.

Let me know how it goes.

Syahrul

comments: author: Herb Salgado
body: Hello Syahrul,

Thank you for the response.

The URL shows the atlassian.net address not the OnPrem address. Should I remove it anyway and reattach it and see if that works ?

Herb

(If I click on the eMLR-1973 link it brings up the OnPrem URL )

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


author: Syahrul
body: Hi [@Herb Salgado](/t5/user/viewprofilepage/user-id/4991673)

Thanks for the update.

I believe we need to investigate the issue further, and I have proceeded to raise a support ticket on your behalf. Please get back to me on the support portal. [here](https://support.atlassian.com/requests/BBS-189565/)

Cheers,  
Syahrul


author: Syahrul
body: Hi everyone,

As suggested by [@Herb Salgado](/t5/user/viewprofilepage/user-id/4991673) I'll share how the issue was resolved.

Currently, Bitbucket cloud establishes a link in the commit or PR by following the **Links**configured in the repository settings.

In this case, the repository that is affected still has its Jira server URL as a primary link so when Jira wanted to establish the link it uses the Jira server as the **Primary link** instead the newly added Jira cloud integration.

To fix this we'll need to remove the old Jira server link by deleting it at **Repository settings \> Links**

![Screenshot 2022-07-28 at 12.58.40 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/208509iD85446B39602A2CB/image-size/large?v=v2&px=999 "Screenshot 2022-07-28 at 12.58.40 PM.png")

Once the old Jira server link is remove it will automatically make the Jira cloud link as the primary link.

Cheers,  
Syahrul


author: Herb Salgado
body: Thank you Syahrul


Tags: bitbucket-cloud

cloud

jira-cloud
How to use a Repositories HTTP Access token to Clone it
Asked by Tim:

I'm very confused about Bitbucket Repository HTTP Access Tokens (and your bitbucket docs seem to be very confused as well).

I found out that the feature is coming from a "plugin?": The URL of it in the settings is <https://bitbucket.company.com/plugins/servlet/access-tokens/admin> but i didn't find a plugin installed on our side that fits to the name so i assume it's a built-in one.

When i'm in the repo settings, i have a menu to create access tokens and a text that explain that i can clone the repo and interact with the rest api with this token.

I found out that the token is in fact a Bearer Token with which i can login with the website (dunno about api because the rest api is quite terrible and never really works for us).

What bothers me is the description of the Access Tokens which imply the possibility of using it with git clone.

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

And when i klick the link it shows a "Page not found page". And when i search in the docs for HTTP Access Token, i only get docs for Personal Access Tokens which are different.

Can someone clarify what's going on here? Can i use the token to clone the repo with basic auth? If yes, what's the username? Why are the docs so confusing? I'm lost here.


Answers:
author: Yann Larhantec
body: Hi Christian,

We have the same problem here.

I created a **HTTP access tokens** inside a repository.

I tried to :  
git clone <https://token_name:token@bitbucket....com/scm/xxx/test.git>

And I get an **fatal: Authentication failed**

Do we miss something on how to use it ?

We're running on Bitbucket 7.21.4

And btw, the link ***Learn more about HTTP access tokens*** on top of the section targeting [BITBUCKETSERVER0721](https://confluence.atlassian.com/display/BITBUCKETSERVER0721/Personal+access+tokens?utm_campaign=in-app-help&utm_medium=in-app-help&utm_source=stash#Personalaccesstokens-usingpersonalaccesstokens) doesn't work.

Thx for your help

Regards

Yann


author: Christian Glockner
body: Hi Tim,

When it comes to git operations the token replaces the password. The username should be the user whom the token belongs to. For REST API operations you can specify the token in the Authorization header.

Cheers,

Christian

Premier Support Engineer

Atlassian

comments: author: Tim
body: I understand, but this isn't a personal access token. It's a HTTP Access Token i create in the Repository Settings.

I cannot use this access token with my own username to clone the repository. I'm getting an expected fatal: Authentication failed for Repoxyz error if i try this.  


author: Piotr Kubiak
body: Hi Christian,

Any update? I have the same problem.


Tags: bitbucket-server

server
Multiple Products Security Advisory - CVE-2022-26136, CVE-2022-26137
Asked by Rashmi:

Hi Team!

For bitbucket datacenter we are running on version v7.8.0, in the version list atlassian has provided it says

* All versions 7.7.x through 7.16.x

But in fixed version they have provided , it says -

|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Bitbucket Server and Data Center | * 7.6.x \>= 7.6.16 ([LTS](https://confluence.atlassian.com/enterprise/long-term-support-releases-948227420.html)) * 7.17.x \>= 7.17.8 ([LTS](https://confluence.atlassian.com/enterprise/long-term-support-releases-948227420.html)) * 7.19.x \>= 7.19.5 * 7.20.x \>= 7.20.2 * 7.21.x \>= 7.21.2 ([LTS](https://confluence.atlassian.com/enterprise/long-term-support-releases-948227420.html)) * 8.0.x \>= 8.0.1 * 8.1.x \>= 8.1.1 * Versions \>= 8.2.0 |

We need a clarity on this, if version 7.8.0 is impacted and if yes which is fixed version for this?

You help is much appreciated!

Regards,

Rashmi


Answers:
author: Christian Glockner
body: Hi Rashmi,

Yes, as stated
> * All versions 7.7.x through 7.16.x

are affected, so that includes 7.8.0.

The next highest version you can upgrade to that contains the fix is 7.17.8.

Cheers,

Christian  
Premier Support Engineer

Atlassian

comments: author: Alin Faur
body: Is there any chance for identifying a workaround that would only patch applications in their existing version instead of having to upgrade?


author: Christian Glockner
body: Hi Alin,

Upgrading is the only way to resolve this vulnerability.

Cheers,

Christian

Premier Support Engineer

Atlassian


Tags: bitbucket-server

cve-2022-26136

cve-2022-26137

server
Impossible to add ssh key to repository
Asked by Anthony Cavatz:

Hello

I'm trying to add a ssh key to my repository but I get this error  
"Someone has already added that key as an access key to a repository."

<br />

I went through all the repositories and the key is not referenced in any of them.   

Someone could help me please


Answers:
author: Syahrul
body: Hey [@Anthony Cavatz](/t5/user/viewprofilepage/user-id/4981268)

G'day and Welcome to the community!

The error means someone has already used the SSH key. So to verify, has this SSH key been added to your account? If yes, you can't use the same SSH key on a repository if you've added the SSH key to your account.

However, if you never added the SSH key to your account, then maybe someone used the SSH key before you used it. This can happen if you are using a shared notebook/machine.

If this s the case, please let me know.

Cheers,  
Syahrul

comments: author: Anthony Cavatz
body: Hello

The key has never been used for an account...


author: Syahrul
body: Hey [@Anthony Cavatz](/t5/user/viewprofilepage/user-id/4981268)

Noted, I have proceeded to raise a Support ticket for you to further investigate this issue. You can access your ticket at our [Support portal](https://support.atlassian.com/requests/BBS-189487/)

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
Get a list of branches based on branch type
Asked by Asha:

Hi,

using the Bitbucket Rest API is there a way to filter the branches based on branch type ?

ex. I want to get the 'release' branches of a particular repository.

tried this API, but it is returning all the branches

<https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/refs/branches?branchtype=release>


Answers:
author: Ben
body: Hey Asha,

Welcome to the Bitbucket Cloud Community! :)

The /2.0/repositories endpoint supports filtering/sorting based on the properties of the schema (this can be found in the JSON response).

For your case, the "name" property can be found in the JSON response, and thus can be filtered to find branches which begin with a certain string.

```
name ~ "release/"
```

When converted to unicode using escape characters to form the URL, this results in the following URL which can be queried with the GET method to provide this list for you:

```
https://api.bitbucket.org/2.0/repositories/{workspace}/{reposlug}/refs/branches/?q=name%20~%20%22release%2F%22
```

More information/instructions can be found here: <https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering>

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Asha
body: Hey Ben,

I tried the API by filtering the branches by name as you suggested. API is fetching all branches starting with name release instead of active branches.

for ex., I have 50 branches out of which 10 branches are active. The API is getting a total of 50 branches instead of 10. Can you suggest an API/ filtering for this.


author: Ben
body: Hi Asha,

Unfortunately - as the API does not expose ahead/behind information, it is not possible to determine active branches based on the API call.

This has been logged with our development team accordingly, feel free to "Watch" this issue to receive updates related to it and "Vote" on this issue to improve the visibility of customer demand:  
<https://jira.atlassian.com/browse/BCLOUD-12592>

You can run a git for-each-ref command to sort the committer date for each branch and pipe a grep command to only show release branches, this way you can cross-reference the API results and determine which branches should be considered and which should be ignored:

```
git for-each-ref --sort=-committerdate --format='%(committerdate:short) %(refname)' refs/heads refs/remotes | grep 'release/'
```

You can further filter this by adding the **--count** switch to get at most the specified number in your results eg **--count=10**

<br />

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
how to give global read-only permissions to all users/user groups in Bitbucker DC/Server?
Asked by Nithya Ananda:

We want to give a group of users read-only access to all projects and repos in Bitbucket.

Any ideas how to do this?


Answers:
author: Richard O_Brien
body: Hi, I'm looking for a similar solution...is there any advice on this? Thanks.


Tags: bitbucket-server

server
source tree 1.9 isnt starting
Asked by ReyGeeK Gilboy:

i just upload source tre to the latest version and ist not working simply dint start i alreade uninstall and reinstall the program but is the same, the only thing that works is to install a really old version what should i do im not a programmer and i dont know how to fix this kind of things... HELP!


Answers:
author: Ana Retamal
body: Hi! Can you let us know which version of SourceTree and which OS are you currently using? You mentioned that installing a really old version of SourceTree worked, have you tried upgrading from that one?

Regards,

Ana
sourcetree in mac doesnt start?
Asked by Rahul:

sourcetree doesnt start keeps giving a messgae to upgrade t0 2.5.1+ even when i am using 2.5.2 or 2.5.3


Answers:
author: bgannin
body: From all reports we've gathered that alert is typically shown on managed machines when the network adminstrator has set a policy that's not properly detecting the versions of SourceTree.

Brian Ganninger  
Senior Mac Developer, SourceTree


author: bgannin
body: We've not encountered or heard about this before. What OS are you on? What happens if you delete the app and download the latest version from our website?

comments: author: Rahul
body: I am on MacOS Sierra v - 10.12.5

I have tried to download the app from website but still gives the same error.


author: Tarun Trehan
body: Hi All,

I face the same error. Attaching some screenshots.

![Screen Shot 2017-07-11 at 1.23.06 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/2926i635D4DF432579191/image-size/large?v=v2&px=999 "Screen Shot 2017-07-11 at 1.23.06 PM.png")![Screen Shot 2017-07-11 at 1.20.54 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/2927i9505FF1FA59A1295/image-size/large?v=v2&px=999 "Screen Shot 2017-07-11 at 1.20.54 PM.png")