youngmon/atlassian-qna huggingface dataset:
disable "git notes add" behaviour for semantic-release integration
Asked by Oleksandr Kulbida:

I receive an extra "git notes" commit **"Notes added by 'git notes add'"** after main branch merge with semantic release integration. This behaviour is reproducible in bitbucket only and visible only in bitbucket UI.

The problem is similar to this one:

<https://github.com/semantic-release/semantic-release/discussions/2017#discussioncomment-995308>

Thanks,

Oleksandr


Answers:
author: CARLOS MORFIN DIAZ
body: Has the command "git push origin :refs/notes/semantic-release" worked for anyone to delete the ghost commits with the message "Notes added by 'git notes add'" that appear in Bitbucket?


author: Billy Bouman
body: [@Oleksandr Kulbida](/t5/user/viewprofilepage/user-id/4600710)were you able to resolve this?

comments: author: Oleksandr Kulbida
body: nope, but you can run after each pipeline ?

```
git push origin :refs/notes/semantic-release
```


author: Mark C
body: Hi [@Oleksandr Kulbida](/t5/user/viewprofilepage/user-id/4600710)

Welcome to the community.

If you're comfortable sharing your repository URL, may I kindly ask if you could provide it here so that I can check?  
![](https://getsupport.atlassian.com/images/icons/emoticons/information.png) You can mask your repository URL by providing only the first and last characters of your workspace and repository name. (For example: [https://bitbucket.org/w\*\*\*\*\*\*\*e/r\*\*o/](https://bitbucket.org/w*******e/r**o/))

Otherwise, I'll create a support ticket on your behalf.

Regards,  
Mark C

comments: author: Oleksandr Kulbida
body: hi [@Mark C](/t5/user/viewprofilepage/user-id/1210823) ,

Bitbucket repo URL: [https://bitbucket.org/l\*\*\*\*\*\*\*\*\*\*\*\*\*g/sandbox-cicd](https://bitbucket.org/l*************g/sandbox-cicd)

Thank you,

Oleksandr


author: Mark C
body: Hi [@Oleksandr Kulbida](https://community.atlassian.com/t5/user/viewprofilepage/user-id/4600710)  

Thanks for providing your repository URL.  

I went ahead and created a support request on your behalf to further investigate the issue.  

You should be able to receive an email by now about that support ticket.  

Regards,  
Mark C


author: Christian_Metzler
body: Any updates so far? Running into the same problem.


author: Oleksandr Kulbida
body: I have as workaround an extra step like:

\`git push origin :refs/notes/semantic-release\`


Tags: bitbucket-cloud

cloud
add Multiple aws account profile
Asked by Paul Quincy:

Is there a way to put multiple aws accounts defined in the pipeline . Currently creating a pipeline to deploy aws lambda function to multiple aws accounts as shown below. Already inplaced the corresponding env variables on the repo settings but it still fails.

- step: \*build-zip-push  
- step:  
name: Deploy to DEV  
deployment: DEV  
script:  
- \|  
export AWS_ACCESS_KEY_ID=$PREPROD_SECRET_KEY  
export AWS_SECRET_ACCESS_KEY=$PREPROD_SECRET_KEY  
- pipe: atlassian/aws-lambda-deploy:1.1.0  
variables:  
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID  
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY  
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION  
ERROR:  
? Failed to update Lambda function code. Error: An error occurred (IncompleteSignatureException) when calling the UpdateFunctionCode operation: Credential must have exactly 5 slash-delimited elements, e.g. keyid/date/region/service/term, got '$PREPROD_SECRET_KEY/20211012/REGION/lambda/aws4_request'


Answers:
author: Amit Naudiyal
body: Its better not to use AWS_ACCESS_KEY \& AWS_SECRET_ACCESS_KEY. Rather use OIDC settings supported by Bitbucket pipeline: <https://support.atlassian.com/bitbucket-cloud/docs/deploy-on-aws-using-bitbucket-pipelines-openid-connect/>

below works for me:

![Screen Shot 2022-08-29 at 2.53.25 pm.png](https://community.atlassian.com/t5/image/serverpage/image-id/213194iA1DFB266721A2A51/image-size/large?v=v2&px=999 "Screen Shot 2022-08-29 at 2.53.25 pm.png")


author: Igor Stoyanov
body: [@Paul Quincy](/t5/user/viewprofilepage/user-id/1290793) Hi. Thanks for your question. Please provide us with full bitbucket-pipelines.yml file to understand your case more clearly.  

Regards, Igor.


author: Ajay _view26_
body: Hi [@Paul Quincy](/t5/user/viewprofilepage/user-id/1290793)

I use the below pipeline code to update my Lamda

# This is a sample build configuration for Other.  
# Check our guides at <https://confluence.atlassian.com/x/5Q4SMw> for more examples.  
# Only use spaces to indent your .yml configuration.  
# -----  
# You can specify a custom docker image from Docker Hub as your build environment.  
image: atlassian/default-image:2

pipelines:  
custom:  
deploy:  
- step:  
name: Build and package  
script:  
- apt-get update \&\& apt-get install -y zip  
- zip -r lambda.zip index.js package.json package-lock.json services node_modules  
artifacts:  
- lambda.zip  
- step:  
script:  
- pipe: atlassian/aws-lambda-deploy:0.5.3  
variables:  
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID # Optional if already defined in the context.  
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY # Optional if already defined in the context.  
AWS_DEFAULT_REGION: $AWS_REGION # Optional if already defined in the context.  
FUNCTION_NAME: $AWS_LAMBDA_FUNCTION_NAME  
COMMAND: 'update' # 'alias' or 'update'  
# Update variables  
ZIP_FILE: 'lambda.zip'


Tags: aws

bitbucket-pipelines

cloud

lambda
Bitbucket limit requests - 429
Asked by Mestra Soft:

Good day Atlassians!)

I have app - monitoring activity of users! It collects information from my workspaces, repositories, pullrequests, commits and also comments for each pullrequest and commit!

And we need to collect activity with interval 5 min(to get actual information of activity), but if commits or pullrequests \>= 100 and request comments for each of them = more than 1000 requests in an hour!

<https://support.atlassian.com/bitbucket-cloud/docs/api-request-limits/>

How to resolve this Issue? how to get all comments for all commits, or pullrequests?


Answers:
author: Theodora Boudale
body: Hi [@Mestra Soft](/t5/user/viewprofilepage/user-id/4562515),

Are you using Bitbucket Cloud (<https://bitbucket.org/>) or Bitbucket Server (self-hosted instance)?

The documentation you included in your post is for Bitbucket Cloud, however, I see that your question has the tag 'bitbucket-server', so I just wanted to make sure which product you are referring to.

If your question is about Bitbucket Cloud rate limiting, the API limits are fixed across the platform for all users, I'm afraid that we cannot increase them. The only suggestion I can make would be to adjust the frequency of the calls so that the total number of calls to /2.0/repositories/\* won't exceed 1000 calls per rolling hour (please note that the hour is rolling hour, not "fixed clock hour").

Kind regards,  
Theodora

comments: author: Mestra Soft
body: Thank you, Theodora!) Yes, using Bitbucket Server!)We have founded resolve to reduce number of requests)


author: Theodora Boudale
body: Hi [@Mestra Soft](/t5/user/viewprofilepage/user-id/4562515), thank you for the update, it's good to hear that you managed to resolve this!

Kind regards,  
Theodora


Tags: bitbucket-server

migration-customer-care

server
Pipeline on Android : how get gradle properties
Asked by Giuseppe Sorce:

Hi after some tutorial i create my first pipeline, create apk, upload file in Downloads and send an email.

I need to get app versionName and versionNumber... is it possibile to get this variabiles.

os there some tutorial..


Answers:
author: Giuseppe Sorce
body: Up

i need to read prop fro any file txt


Tags: bitbucket-cloud

bitbucket-pipelines
Different bitbucket-pipelines.yml files on different branches
Asked by Salman Azmat:

Hi,

If we have a bitbucket-pipelines.yml file on main branch and some one modifies this file and pushes it to the develop branch, which file would then be executed actually ?

Basically, if we have different conflicting versions of pipelines file on different branches, which one gets executed ?  


Answers:
author: Mark C
body: Hi [@Salman Azmat](/t5/user/viewprofilepage/user-id/4574082)

Welcome to the community.  

The YAML (bitbucket-pipelines.yml) configuration for Pipelines is based on branches and it will depend on your YAML triggers.  
Initially, once you enabled Pipelines, a YAML file will be added to your main branch.  
Once you created a new branch (e.g. **develop** ) from the main branch and pushed a commit to the **develop** branch, Pipelines will run your YAML file from the **develop** branch.  

Now, Pipelines triggers will vary depending on your YAML trigger configuration.  

You can check out [this documentation](https://support.atlassian.com/bitbucket-cloud/docs/pipeline-triggers/) to know more about different ways to trigger a Pipelines build.

In conclusion, if you have different versions of your code for different branches, you will need to maintain your YAML file per branch.  

Feel free to let me know if you have further questions that I can help with.  

Regards,  
Mark C

comments: author: Steven Hayhurst
body: Appreciate I'm resurrecting a very old thread here but I have this exact same issue. Is there a way we can have one single yaml file in a repo which every branch references? Currently when we need to make a change to a step, that change much be done in a branch and then every other branch must merge it in, in order to run the latest version of the pipeline.

Ideally I just want one bitbucket-pipelines.yml file which every branch can see and run, without running their own local copy.

(Note this is just one single repo in one workspace)


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
I'm not receive any emails from atlassian/bitbucket
Asked by wojtek-mentor:

I'm not receive any emails from bitbucket and atlassian for a week.

Regards,

Wojtek W


Answers:
author: Theodora Boudale
body: Hi [@wojtek-mentor](/t5/user/viewprofilepage/user-id/4599613),

I checked in our system and I saw that your email was in a suppression list. Atlassian attempted to send an email to your email address a few weeks ago and received a hard bounce response from your mail server, which indicates permanent failure. The email is then placed in a suppression list, as we no longer try to send to non-existing emails.

I went ahead and removed your email from the suppression list. In case any Bitbucket invitations were sent to that email, please ask one of your admins to resend it now, as the previous ones were dropped.

Please feel free to let me know if things are ok now and if you need anything further.

Kind regards,  
Theodora

comments: author: wojtek-mentor
body: Hi,

everything worked :D Thank's very much


author: Theodora Boudale
body: Thank you for the update and you are very welcome, I'm glad to have helped!

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
error while creating external database connection with mssql server
Asked by Rajkumar V:

Bitbucket requires a case-sensitive database, but the target database is case-insensitive. For information about creating a database for use with Bitbucket, please refer to the Bitbucket documentation.


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the community!

Do you have a question or something to talk about here? Pasting error messages which explain what the problem is and suggest you read docs is not really going to get a conversation started.

Have you tried connecting it to a case-sensitive database? Or read the docs?


Tags: bitbucket-server

server
Cannot sign in to bitbucket account
Asked by replykate38@hotmail.fr:

Hi, sorry for my bad english.

Each time i try to login, i have this message:

Your Bitbucket account with username **\*\*\*\*\*\*\***is not linked to your Atlassian account \*\*\*\*\*\*\*\*\*\*.

Any solution ?

Thank you


Answers:
author: Caroline R
body: Hi, [replykate38@hotmail.fr](/t5/user/viewprofilepage/user-id/4599548)! Welcome to the community!

Checking your Bitbucket account, I can see that this account is linked to a [workspace](https://support.atlassian.com/bitbucket-cloud/docs/what-is-a-workspace/) that has been converted from a team account. Bitbucket has removed the [ability to log in using a team account](https://confluence.atlassian.com/bbkb/team-account-changes-454361799.html) so that's the reason you are not being able to log in/link this account.

In order to allow you to reaccess this account, we can disassociate the email from this workspace. Then, you will be able to create a new account using this address, as a personal account.

After creating your account, please let me know through this question, so I can give you admin access to this workspace again.

In case you want to proceed with the disassociation of your email from this workspace, please add your approval here.

Please don't hesitate to ask for any further information if needed.

Kind regards,  
Caroline


author: Nic Brough -Adaptavist-
body: There should be a "link account" option on the login screen.

If this is failing, or not present, it may be that your username account was a team one, which are no longer supported ( see <https://confluence.atlassian.com/bbkb/team-account-changes-454361799.html> ). It may also be that someone has already linked the username to their Atlassian account, so you can't do it, and you'll need to ask the admins to add your Atlassian account to the team.

You may need to raise this directly with Atlassian, as I think it's a back-end thing to remove old accounts like this, so that they can be re-linked.


Tags: bitbucket-cloud

cloud
BITBUCKET_TAG is always equals to "develop"
Asked by Jonathan B:

Hello,

I have the following pipeline my repo:

```
tags:

  '*.*.*':

    - step:

       script: 

         - make push_stable

?
```

Then the Makefile which is used:  

```
ifeq ("$(CI)", "true")
 VERSION=$(BITBUCKET_TAG)
endif

push_stable:
  echo $(BITBUCKET_TAG)
  ...
```

When I go on a specific commit (does not matter on what branch I am ) and tag it (with UI), the pipeline will correctly trigger. But the value displayed for BITBUCKET_TAG is always equal to "develop".

I saw this [post](https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/When-is-BITBUCKET-TAG-environment-variable-set/qaq-p/293620) but, to be honest, i do not quite understand the conclusion.   
Am I supposed to use the BITBUCKET_TAG as part of pipeline script ?


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

Could you please check the value of $BITBUCKET_TAG directly in the YML file instead of printing from the Makefile? That will help us to take out the makefile related issues outside.

You can use the following YML:

    tags:  '*.*.*':    - step:       script:          - echo $BITBUCKET_TAG

Thank you. Please, feel free to share any additional information regarding this case.

Kind regards,  
Caroline


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

tag
How can I use the Bitbucket API to add an SSH key to a Workspace?
Asked by Drew Heasman:

I'm trying to work out how to add an SSH key to a Workspace.

There is this documentation for adding an SSH key to a User: <https://developer.atlassian.com/bitbucket/api/2/reference/resource/users/%7Bselected_user%7D/ssh-keys#post>

But I can't find anything for the Workspace, this call only adds an SSH key to my user.

When performing the action using the UI in a browser the users/%7Bselected_user%7D/ssh-keys call appears to happen, but I can't work out what is making it get added to the Workspace instead of the User.

Any help appreciated.


Answers:
author: seanaty
body: What is your reason for adding an SSH to a workspace?

SSH keys are only meant to be added for users.

The closest thing to what I think you're looking for is called Access Keys. You can upload SSH keys for each individual repository to enable \`git clone\` and \`git pull\` (read only) access only. This is useful for running tests or for deploying.

At the moment this is repository by repository. However, hopefully we'll have a solution for group the same repository settings for a project (a collection of repositories).

comments: author: Drew Heasman
body: Hi [@seanaty](/t5/user/viewprofilepage/user-id/1301071),

We use git submodules, so are generating a Pipeline SSH Key for a repository, then adding the generated public key to the Workspace SSH keys, so Bitbucket Pipelines can access other repositories during a build.

Creating the Pipeline SSH Key is possible via this endpoint: <https://api.bitbucket.org/internal/repositories/>\<workspace\>/\<repo\>/pipelines_config/ssh/key_pair/generate

When I create a Workspace SSH key via the UI it calls this endpoint:  
<https://api.bitbucket.org/2.0/users/>\<user\>/ssh-keys - but if I do that directly (e.g. with curl), the key is added to the User, not the Workspace and I can't work out why.  
Any help, or update to the API docs, would be appreciated.


author: Drew Heasman
body: [@seanaty](/t5/user/viewprofilepage/user-id/1301071) - any thoughts?


Tags: bitbucket-cloud

cloud
how to find older versions of phpOIDC olderversion
Asked by bala:

Hi, my php version as 7.1 i need php OIDC older version suitable to my projects

<https://bitbucket.org/PEOFIAMP/phpoidc/src/master/>


Answers:
author: bala
body: <https://bitbucket.org/PEOFIAMP/phpoidc/src/master/>


Tags: bitbucket-cloud

cloud
I can't see all users in Branch permissions
Asked by xguntis:

This is how i grant the permissions:

Repository Settings -\> Branch permissions

Then in write access I click on dropdown and want to select a user, but he is not there: ![](https://i.imgur.com/pWzMlr1.png)

The user I am looking for has Admin access to the repository


Answers:
author: Caroline R
body: Hi, [@xguntis](/t5/user/viewprofilepage/user-id/3945559)!

Thank you for reaching out to Atlassian Community!

I understand that when you click on the dropdown, the user you need to add doesn't show up. Could you please confirm if you tried to write their name to search for this user? The reason I'm asking this is that the dropdown may not show all the users, but it should show you the user if you search for their name.

In case it doesn't work even when you type the username, could you please confirm that this is happening only with this user?

Kind regards,  
Caroline

comments: author: xguntis
body: I already contacted the support and now I am not sure if they did something or I just had to type the user name. Pasting in the user name worked.

I think it would be good if it would search by email also. The member's name was in Russian that's why i could not type it in.


author: Caroline R
body: Hi, [@xguntis](/t5/user/viewprofilepage/user-id/3945559).

I'm glad to know everything is working as expected now.

About your suggestions to add the ability to search the users by email, you can either [create a Feature request](https://jira.atlassian.com/secure/Dashboard.jspa) if you'd like that or let me know if you want me to open it for you.

Kind regards,  
Caroline


author: xguntis
body: please you do


author: Caroline R
body: Hi, [@xguntis](/t5/user/viewprofilepage/user-id/3945559).

I have created the following feature request:

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

I would suggest that you add your vote there (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features.

You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.  
Kind regards,  
Caroline


author: xguntis
body: Thanks, i added my vote.


Tags: bitbucket-cloud

branch

cloud

permission
Bitbucket Server to Non-Clustered Data Center Migration
Asked by Leon Ree:

Hi,

I'm needing to upgrade a Bitbucket Server (starter license) to allow more users and using the cloud product is not an option. Moving to Bitbucket Data Center looks to me like my only Atlassian option now. When I read <https://confluence.atlassian.com/bitbucketserver/migrate-from-server-to-data-center-996641211.html> it sounds to me like I simply need to purchase and apply a Data Center license and the server will switch over to Data Center mode without needing to do do any other installation. Does anyone have experience with this and can let me know if it works this way? If I don't have to install a new instance I'd be happier about switching to the Data Center version.

Thanks,

Leon


Answers:
author: Christian Glockner
body: Hi Leon,

It depends on whether you're using Windows or Linux as the OS because Windows is not supported with Data Center licenses. But if you're using Linux, then indeed it's as simple as entering the new license key.

Cheers,

Christian

Premier Support Engineer

Atlassian


Tags: bitbucket-server

server
Bitbucket API bug: links returned from pipeline trigger will 404
Asked by Tom S:

I think this is a bug with the Bitbucket API.

I triggered a pipeline build with a curl like:

```
curl \
  -X POST \
  -s \
  --fail-with-body \
  --user blah:blah \
  -H 'Content-Type: application/json' \
  https://api.bitbucket.org/2.0/repositories/blah/some-project/pipelines/ \
  -d '{...}'
```

...and it triggered fine. The response includes this fragment:

```
"links": {
  "self": {
    "href": "https://bitbucket-pipelines.prod.public.atl-paas.net//rest/1.0/accounts/zzzz897f-cf32-4b66-825f-5123a9665fab}/repositories/zzzzf159-d03c-4508-a9cb-fa5a922e7e07}/pipelines/zzzz4283-b506-43eb-a8b5-376806f99be6}"
  },
  "steps": {
    "href": "https://bitbucket-pipelines.prod.public.atl-paas.net//rest/1.0/accounts/zzzz897f-cf32-4b66-825f-5123a9665fab}/repositories/zzzzf159-d03c-4508-a9cb-fa5a922e7e07}/pipelines/zzzz4283-b506-43eb-a8b5-376806f99be6}/steps"
  }
}
```

...but when I tried to GET either of those URLs, I get a 404. When I remove the double slash at the end of the hostname (\`paas.net//rest\`), then I get a better response. I actually get a 401, but that probably is something I'm doing wrong.

The point is that the server probably has a trailing slash configured on the prefix that is prepended to the rest of the URL that's returned to the caller.


Answers:
author: Theodora Boudale
body: Hi Tom,

This is indeed a bug, the urls that are returned are internal urls and cannot be used to retrieve the pipeline or the steps.

We have a bug report about this in our issue tracker:

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

The way to work around this at the moment would be to manually assemble the url instead of using the ones in the response

<https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid>}   
<https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/>

Kind regards,  
Theodora


Tags: api

bitbucket-pipelines

cloud
Unable to migrate to 'main' from 'master' branches
Asked by Muhammad Saleem:

I have created a main branch and am working on it successfully. After configuring the workflow and default branch to 'main', I am still having my repo saying that 'master' is the main branch in BitBucket Cloud and cannot delete it[.](https://apksprofree.com/) This is not correct behaviour.


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

Could you please confirm where exactly you are seeing the word master in Bitbucket UI? You can share a screenshot if you want (hiding any private information).

Thank you! Please feel free to share any additional information regarding this case.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud