youngmon/atlassian-qna huggingface dataset:
How can I use date filters in bitbucket commits and pipelines REST APIs
Asked by Bhargavi Chanboina:

Hi ,  
I am using bitbucket commits and pipelines REST APIs  
I want to fetch only the commits that are created after a particular date  
For that I used q filter as mentioned in documentation ++[https://developer.atlassian.com/cloud/bitbucket/rest/intro/?utm_source=%2Fbitbucket%2Fapi%2F2%2Freference%2Fmeta%2Ffiltering\&utm_medium=302#filtering](https://developer.atlassian.com/cloud/bitbucket/rest/intro/?utm_source=%2Fbitbucket%2Fapi%2F2%2Freference%2Fmeta%2Ffiltering&utm_medium=302#filtering)++ But it is not working.  

Here is my query   
<https://api.bitbucket.org/2.0/repositories/amanrajqentelli/opup/commits?q=date%3C%222017-01-01%2000:00%22>  

Could you please help me figure out how to use date filters in commits and pipelines?


Answers:
author: Patrik S
body: Hello [@Bhargavi Chanboina](/t5/user/viewprofilepage/user-id/4985613) ,

Welcome to Atlassian Community!

I'm afraid that filtering is currently not available for the commits and pipelines endpoints, but we already have the feature requests below to implement that functionality :

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

I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with [this policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) in mind.

While this feature is not implemented, you can retrieve all pipelines or commits using the APIs and then use an external tool that filters JSON data, like **jq**, to filter the results.

Thank you, [@Bhargavi Chanboina](/t5/user/viewprofilepage/user-id/4985613) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud
Can not clone push to repo
Asked by Md.Mahade Hassan:

My previous email was : mahade.hasan68@gmail.com  
Then i changed to mahade@quester.io

after that all my repo are not sync with local. i am not able to clone, push etc.  
Than i tried to change the user name but after changing my user name still not working.  

i can login to my account via browser with new email but can not login with new username


Answers:
author: Pramodh M
body: Hi [@Md.Mahade Hassan](/t5/user/viewprofilepage/user-id/4985564)

Welcome to the Community!!

If you are able to access the repo in the Browser, you will have to remove the existing credentials in the system and authenticate again in order to clone the repositories.

Can you try the below steps and let me know if it worked

<https://community.atlassian.com/t5/Bitbucket-questions/unable-to-access-clone-repo-The-requested-URL-returned-error-400/qaq-p/1997903>

Thanks,  
Pramodh

comments: author: Md.Mahade Hassan
body: I have generate app password  
with this password now repository are syncing.  
thanks


Tags: bitbucket-cloud

cloud
Can not login to bitbucket.org
Asked by Christian Ewers:

Hi,

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

Please reactivate my old bitbucket account, so I can login again.

Thx


Answers:
author: Theodora Boudale
body: Hi Christian,

Your Bitbucket Cloud account was inactive as well, so I went ahead and reactivated it.

Please feel free to let me know if you are able to log in now.

Kind regards,  
Theodora

comments: author: Christian Ewers
body: Thx, yes I can log in now. As many people seem to have the same problem, wouldn't it be possible to reactivate the account when people try to login to bitbucket?


Tags: cloud
Deleting an empty workspace incorrectly states several repos will be deleted
Asked by Mike:

We have an old workspace where the content have already been transferred to other projects and workspaces. So in the housekeeping processing of cleaning it up, tried to delete the project but the delete button no matter how many times you click, won't do anything, so I figured, hey its only one project, maybe that's the reason and they just don't bother tell you. I needed to delete the workspace anyway, so it would go with that.

However, after I click on delete for the workspace, I get this warning which is wholly inaccurate given there are ZERO repos within it, so where is it getting this number?

![image.png](/t5/image/serverpage/image-id/205731iAA7EDF758A0F4B89/image-size/large?v=v2&px=999 "image.png")

But as you can see when clicking on the link showing ++6 repositories++, there is nothing there, I know because I was the one who transferred them out and can confirm they are at their destinations already.

![image.png](/t5/image/serverpage/image-id/205735iFE88A864A16519BB/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Theodora Boudale
body: Hi [@Mike](/t5/user/viewprofilepage/user-id/4010610),

I checked the workspaces your Bitbucket Cloud account has access to. There is one workspace with 6 repositories, however, all 6 of them are Mercurial repos. It is no longer possible to access them from the UI since we sunset support for Mercurial, but they still exist in an unavailable state.

If you don't want to delete the workspace, I can delete these 6 Mercurial repos for you so you can then delete the project where they belong. Please feel free to let me know if you would like me to proceed with that.

Kind regards,  
Theodora

comments: author: Mike
body: [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) Ok, that actually makes sense.

Would just saying, "screw it" and proceeding with the delete after the warning remove all that or will it orphan those Mercurial repos?

If not, then I can just delete them spare you the time. But if yes, then please go ahead and nuke them and let me know. Thank you.


author: Theodora Boudale
body: Hi [@Mike](/t5/user/viewprofilepage/user-id/4010610),

These repos are going to be deleted if the workspace gets deleted.

If you don't want to delete the workspace, please feel free to let me know and I can delete the repos, it's not a problem!

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

workspace
Bitbucket cloud repo issues export failed
Asked by ppswang:

I tried to export issues via "**repository settings** " \> "**Issues: Import \& export**"

I clicked on "**Start export**" and a pop-up shows and starts the export process.

Sometimes this fails, and the pop-up then says "Unexpected error"

![image.png](/t5/image/serverpage/image-id/205727iD6CEE4CD48F29D46/image-size/large?v=v2&px=999 "image.png")

Sometimes it works but the link it created (and also sent via email) goes to:  

[https://bitbucket.org/!api/1.0/repositories/\[WORKSPACE\]/\[REPO\]/issues/export/zip](https://bitbucket.org/!api/1.0/repositories/[WORKSPACE]/[REPO]/issues/export/zip)  

which never works, and shows the standard "Something went wrong" screen.

![image.png](/t5/image/serverpage/image-id/205726i341E7C7E8F00DB2F/image-size/large?v=v2&px=999 "image.png")

I've tried this several times in the past couple of days. Any idea what had gone wrong?


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

Thank you for reaching out to the community and for reporting this.  
Unfortunately, the repository issue export functionality is broken at the moment.  
We do have an existing bug ticket for it that can be located through this link. - <https://jira.atlassian.com/browse/BCLOUD-22019>  
You can watch and click the "This affects my team" button so that you'll be notified of any updates from our team when the bug is fixed.

Do let me know if you have further questions.

Regards,  
Mark C


Tags: bitbucket-cloud

cloud

export
Not receiving email notifications
Asked by Deepak Mehta:

Hi, I have stopped receiving email notification when someone mentioned me or when a pull request is assigned to me. I've checked that I have enabled to receive notifications in Personal settings.

I have read on other questions that an email could have been in a blocked list.

Could you check and enable my email? My email is d\*\*\*\*a@c\*\*\*\*\*\*\*\*\*\*\*\*\*\*l\*\*\*m

Or advise on what the problem could be?


Answers:
author: Mark C
body: Hi [@Deepak Mehta](/t5/user/viewprofilepage/user-id/4985370)

Welcome to the community.  
I can see your email was listed in our email suppression list.  
For this, I went ahead and removed the email from the suppression list.

You should be able to receive email notifications now.

Hope it helps and let me know how it goes.

Regards,  
Mark C

comments: author: Deepak Mehta
body: Thanks Mark, that made it work. I am now receiving notifications.

However, if this happens again, do I have any way to remove from suppression list by myself? May be re-subscribing to notifications?


author: Mark C
body: Hi [@Deepak Mehta](/t5/user/viewprofilepage/user-id/4985370)  

Great! Glad to know it helps.  

Unfortunately, for a hard bounce listed in our email suppression list, we can only remove it manually on our end.

To provide more information on how our email system determines a bounced status, it is based on the ISP response:
>
> #### **Bounces (aka Permanent Failures or 5xx Errors)** {#toc-hId-150893852}
>
> When we receive a 5xx response from the ISP, we will log a "bounce" event and determine the bounce classification based on the 5xx response string. (Bounces classified as "hard" bounces (code 10) are added to the suppression list.)

**Reference** : <https://www.sparkpost.com/docs/faq/understanding-delays-bounces/>

Having said that, if you're constantly having this issue with the hard bounce, the best I can suggest is for you to reach out to your email provider/administrator to investigate it further.  
Otherwise, feel free to reach out to us and we'll help remove the hard bounce on our end.

Do let me know if you have further questions that I can help with and feel free to mark this question as answered as well.

<br />

Regards,  
Mark C


author: Deepak Mehta
body: Thanks [@Mark C](/t5/user/viewprofilepage/user-id/1210823) Appreciate your help!


Tags: bitbucket-cloud

cloud
Is there anyway to download a mecurial repo
Asked by Caesoose:

I'm in a bit of pickle.

I've been travelling for the last few years, and on getting back it appears as though a game I worked on years ago is now doing well. So, wanting to go back and update it a bit to say thank you to all of the players, I've found that the repo is gone on my bitbucket account as it was mercurial. (the manual backup I did was far too old to be usable).

I can see that the repo "technically" exists under my account - my workspace has like 13 projects, of which only 1 of them is accessible (as it's the only one that was using Git), but as I don't pay for support I have no way to contact customer service to get them.

Is there anyway for me to do this? Or will I have to chalk it up and pay to get access to support?

Thanks for any answers


Answers:
author: Patrik S
body: Hi everyone,

Atlassian made a decision to move away from maintaining and supporting Mercurial repositories in 2019.

This was announced in community:

* <https://community.atlassian.com/t5/Bitbucket-articles/What-to-do-with-your-Mercurial-repos-when-Bitbucket-sunsets/ba-p/1155380>

and on our blog:

* <https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket>

Bitbucket Cloud Support team is no longer able to restore those repositories.

If you are looking for a Mercurial repository that was public, all the public repos were archived by Software Heritage:

* <https://bitbucket-archive.softwareheritage.org/>

We will not be able to meet any further requests for recovery of private HG repositories and users will need to recover those from local copies only.

Kind regards,  
Patrik S


Tags: bitbucket-cloud

cloud
How can I integrate OWASP ZAP in the Bitbucket Pipelines?
Asked by Gabriel Moraes Pacheco de Oliveira:

I am fairly new to these issues and was wondering if it is possible to integrate OWASP ZAP with my bitbucket pipelines and break the build if any issue appear.

Can someone send me an example of a template? Or something I can study or read to understand more about pipelines.

My OWASP ZAP instance is installed on an ubuntu server.

I'm trying to build a open-source CI/CD (OWASP Dependency Check, Horusec, OWASP ZAP) and if anyone has any open-source SCA/SAST/DAST ideas, feel free to suggest them.


Answers:
author: Oleksandr Kyrdan
body: Hi [@Gabriel Moraes Pacheco de Oliveira](/t5/user/viewprofilepage/user-id/4985260)

Thank your for your question!

For the integration [Bitbucket Pipelines](https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/) provides [Bitbucket Pipes](https://bitbucket.org/product/features/pipelines/integrations). So you could build powerful, automated continuous integration and continuous deployment workflows in a plug and play fashion.

[12 days of CI/CD blog posts series](https://bitbucket.org/blog/12-days-of-ci-cd) explain and provide details how to use and how to create your custom integration with Bitbucket Pipes.

Feel free to share your idea with our community to help you.

Best regards,  
Oleksandr Kyrdan


author: ABhaskar
body: [@Gabriel Moraes Pacheco de Oliveira](/t5/user/viewprofilepage/user-id/4985260) did you find any solution to integrate OWASP ZAP with bitbucket pipelines ? without having to create your own pipe?

comments: author: Abhinay Sutrakar
body: [@Gabriel Moraes Pacheco de Oliveira](/t5/user/viewprofilepage/user-id/4985260) [@ABhaskar](/t5/user/viewprofilepage/user-id/5104520) [@Oleksandr Kyrdan](/t5/user/viewprofilepage/user-id/2885705) - Did anyone of you able to integrate and run the scan succesfully with OWASP zap.   

For me post scan the pipeline is running endless and ending with timeout.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

security
Stopped receiving bitbucket email notifications
Asked by Ankit:

Hi,

Lately our team has stopped receiving any notifications from Bitbucket(not pull requests or any mentions). Could you please check this up?

Thank you,

Ankit


Answers:
author: Mark C
body: Hi [@Ankit](/t5/user/viewprofilepage/user-id/4985220)

Thank you for reaching out to the community.  
I've checked your email domain on our end but I didn't see any emails listed in our email suppression with your email domain.

Would it be possible for you to confirm if you have the same email domain as your team?

Regards,  
Mark C

comments: author: Ankit
body: Thanks [@Mark C](/t5/user/viewprofilepage/user-id/1210823) for getting back to me.

I did post this one another question and someone else from Atlassian team already fixed this. Thank you!


author: KTR Ankit buj Meena
body: Ankitmeena


Tags: bitbucket-cloud

cloud
git gc on remote
Asked by Once:

Hello,

I have recently cleaned up a repository which had several large binary files in its history. I have rewritten the repo's history with BFG: the size of a fresh clone is now 146 Mb, but still 770 Mb on the server.

My understanding is that someone from Atlassian should run the git garbage collection command. Is there a way to request this from the dashboard ? It seems to be an open issue (BCLOUD-11593) since 2015.

Repo name: s\*\*\*\*v\*\*\*\*r

Thanks in advance !


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

Welcome to the community.

Unfortunately, it is not possible for you to run Git GC (Garbage Collection) against your remote repository at the moment.  
For that, I went ahead and ran Git GC against your remote repository.

From 770 MB, your repository size is now **145 MB**.

Hope it helps and do let me know if you have further questions.

Regards,  
Mark C

comments: author: Once
body: Hi Mark, the repository size is now matching my expectations.

Thanks a lot for the quick reply !


author: Mark C
body: Great! Glad to know it helps.  

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Where can I find the invoices for Bitbucket?
Asked by Chen Grinkroog:

Is there a way to find Bitbucket's invoices?


Answers:
author: Theodora Boudale
body: Hi [@Chen Grinkroog](/t5/user/viewprofilepage/user-id/4635304),

Invoices can be found here <https://my.atlassian.com/billing/paidorders> if you are listed as Technical and Billing contact for this license in <https://my.atlassian.com>. If you are not, you can ask the Technical and Billing contact for this license to add you as well.

If you are not sure which person in your company is a Technical and Billing contact for the license, and you are an admin of the workspace, you can create a ticket with our Customer Advocate team and

* request the invoices
* ask them who is the Technical and Billing contact for this license
* ask to be added as a Technical and Billing contact so you can access the invoices yourself in the future via <https://my.atlassian.com/billing/paidorders>

You can create a ticket via <https://support.atlassian.com/contact/#/>, in "What can we help you with?" select "Billing, payments and pricing" and then "Finding invoices" in "Select a topic". Please make sure to give the URL of the workspace you want to find invoices for in the details of the ticket.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Running a Docker Image in pre-receive
Asked by yasreeb:

Hi Team,  

I would like to execute/run a Docker Image in pre-receive hook before pushing it to bitbucket repository.

<br />

Is that possible?

Any sample code snipped would be appreciated here.  

<br />


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

Welcome to the community.

Unfortunately, it is not possible to run Bitbucket Pipelines build in a pre-receive hook event.  
This is because Bitbucket Cloud does not support server-side pre-receive hook at the moment.  
We do have an existing feature request for it that can be located through this link. - <https://jira.atlassian.com/browse/BCLOUD-10471>  
You can upvote and watch it for now so that you'll be notified of any updates from our team when the feature becomes available on Bitbucket Cloud.  
![](https://getsupport.atlassian.com/images/icons/emoticons/information.png) Please do note that we don't have an exact ETA for the feature request as all new features will be implemented according to our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html).

What you can do for now is to have a workflow where you can push your commits first in a feature branch and run Pipelines builds for that feature branch.  
Once all your tests/validations are passed, you can then merge that feature branch to your main branch (or your preferred branch).

Do let me know if you have further questions.

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Repository name cannot be Numbers for build pipeline to function
Asked by Ryan Geddings:

When trying to deploy the build pipeline using this script,

*** ** * ** ***

```
script:  - pipe: atlassian/bitbucket-upload-file:0.3.2    variables:      BITBUCKET_USERNAME: $BITBUCKET_USERNAME      BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD      FILENAME: 'package.json'      ACCOUNT: 'team-account'      REPOSITORY: 'awesome-repository-name'
```

I identified a bug when the repository only contains numeric characters. The script does not see '1243' as a valid string but instead seems to reference the values as an INT.


Answers:
author: Theodora Boudale
body: Hi Ryan,

Thank you for reporting this, I went ahead and created a bug report in our issue tracker:

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

Our development team tracks bugs over there and will post an update on that issue when this is fixed. Please note that we don't provide ETAs and bug fixing is implemented as per our policy [here](https://confluence.atlassian.com/support/atlassian-cloud-bug-fix-policy-206865884.html).

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
App password not working on uploading download artifact
Asked by alcramer:

Hi --

I have a 50meg windows installer for my product, that sits in the Downloads page of my project. I think this is what Bitbucket calls a "download artifact". Last year -- before Bitbucket started requiring app passwords -- I had no trouble uploading the installer to my Downloads page (I used Insomnia to send the HTML post),

After Bitbucket switched to app passwords, I generated an app password for my project and am able to git my code up/down from the server. But the upload of the download artifact fails. In an effort to solve that, I gave up on Insomnia and wrote a python script. Here's the script:

import requests

#url = '<http://httpbin.org/post>'  
url = '<https://api.bitbucket.org/2.0/repositories/alcramer/comiola/downloads>'

headers = {  
"Authorization": "Bearer MY_APP_PASSWORD"  
}

files = {'file': open('test.txt', 'rb')}

r = requests.post(url, headers=headers, files=files)  
print(r.text)

Bitbucket gives this response:

{"type": "error", "error": {"message": "Access token expired."}}

How do I fix this?

Thanks!

Al Cramer


Answers:
author: alcramer
body: I fixed my problem. When you open an account on Bitbucket, it asks that you enter a "Name" (I entered "Al Cramer", as that happens to be my name). When it creates depositories, it mangles the string you entered to create a string that they call your "username" (mangling seems to be: convert to lower case and kill spaces). That mangled string is the one that's used to create paths.

BUT it's also the string you need to specify as user if you do an HTTP POST. This curl upload command fails:

curl -v -u "Al Cramer:MY_APP_PASSWORD" -X POST <https://api.bitbucket.org/2.0/repositories/alcramer/comiola/downloads> -F files=@test.txt

But this upload works:

curl -v -u "alcramer:MY_APP_PASSWORD" -X POST <https://api.bitbucket.org/2.0/repositories/alcramer/comiola/downloads> -F files=@test.txt

I leave it to minds more powerful than mine to consider Bitbucket's handling of "Name" vs "username", and how that impacted on their decision to switch from email addresses to mangled names on file uploads of depository artifacts.


Tags: bitbucket-cloud

cloud
What could be slowing new windows client down?
Asked by PovilasID:

It takes minutes for the client to load anything...

My specs: SSD 1Gb/s broadband, i5 16GB RAM

The client starts after about a 5 minutes and repositories get loaded in... it freezes on every interaction.

I get that git is a blocking process but UI should not hang on pressing the help button.


Answers:
author: Mike Corsaro
body: Hello! Could you please provide the following information:

* Number of repos bookmarked
* Size of repos (load up a repo, and go to Repository\>Benchmark Repo Perfomance)

Additionally, could you try the following:

* Go to Tools\>Options and uncheck both "Refresh automatically when files change" and "Refresh when application is not in focus"

Thanks!