youngmon/atlassian-qna huggingface dataset:
bitbucket archive REST API
Asked by Kule Dude:

According to the bitbucket **archive** API, there is a "path=" parameter which I believe can be used to get only the contents of a particular folder. But it does not seem to work.

For me the API call with and without "path=" gives the same output. (The whole repo contents as zip).

archive?format=zip\&path=some%2Fpath%2Finside%2Frepo  
archive?format=zip  

**\*\*EDIT\*\* There is no problem with the archive REST API. I was using wget from shell to test the API and since '\&' is a special character for shell wget was not getting the path param at all**

Is there a problem the way i use it? How is this "path=" param supposed to work?

I tested with "Atlassian Bitbucket v7.1.2"

Reference:

<https://docs.atlassian.com/bitbucket-server/rest/7.1.2/bitbucket-rest.html>

### /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/archive {#toc-hId-1200960687}

|----------|------------------------------------------------------|-------------------------------------------------------------------------------------|
| **path** | *[string](http://www.w3.org/TR/xmlschema-2/#string)* | paths to include in the streamed archive; may be repeated to include multiple paths |


Answers:
author: Kule Dude
body: There is no problem with the archive REST API. I was using wget from shell to test the API and since '\&' is a special character for shell wget was not getting the path param at all. Putting quotes around the url param for wget solved the issue for me.  

```
wget -O test.zip "http://server.name/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/archive?format=zip&path=some%2Fpath%2Finside%2Frepo"
```


Tags: bitbucket-server

server
How can we avoid having to enter 2 separate two factor authentication codes?
Asked by Dave Ludwig:

We have both JIRA Cloud and BitBucket Cloud Premium and they are all nicely linked together. Any time we use a web browser to log in to our bitbucket site, it requires us to enter an Atlassian 2FA code, followed by a BitBucket 2FA code. These are separate codes that appear in our authentication apps on our phones.

I do have 2FA enabled on the bitbucket workspace as well as for JIRA/Atlassian in general. But having to enter 2 of them is overkill.

Is this behavior intended in terms of the Atlassian products? What can I do to alleviate this problem? I just want users to enter one 2FA code if they access JIRA or bitbucket, and then have access to the whole thing.

Thanks,

Dave


Answers:
author: Theodora Boudale
body: Hi Dave,

Please allow me to provide some context on this:

Right now authentication for JIRA Cloud and Bitbucket Cloud happens via the same Atlassian account (the one for <https://id.atlassian.com/>).

A few years back, this was not the case. A JIRA Cloud account and a Bitbucket Cloud account with the same email were separate, each of them had its own credentials and logging in to one product wouldn't automatically log you in to the other one.

A few years back we introduced Atlassian accounts to provide single login with the same email to customers using different Atlassian Cloud products. As a result of this change, if you have 2FA enabled for both the Atlassian account and the Bitbucket Cloud account with the same email, you'll need to enter a 2FA code twice.

I understand that this can be less than ideal and we have a feature request to unify these (please feel free to add your vote and any feedback in that request):

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

If all your Bitbucket users have an email from a company domain that you manage with Atlassian Access, you can enforce 2FA on the organization level:

* <https://confluence.atlassian.com/cloud/enforced-two-step-verification-938859738.html#Enforcedtwo-stepverification-Enforcetwo-stepverification>

and disable the similar feature in Bitbucket Cloud ("Require two-step verification" setting).

Afterwards, users can disable 2FA for their Bitbucket account and they'll only need to enter one 2FA code for the Atlassian account.

I would like to mention once more that the important thing here is that all Bitbucket users have an account with an email from your managed domain. If you have or invite to your company workspace a Bitbucket user with an email other than your managed emails, that user will be able to access the content of the workspace without having 2FA enabled (after you disable "Require two-step verification" in Bitbucket).

I hope this helps, please feel free to let me know if you have any questions.

Kind regards,  
Theodora

comments: author: Dave Ludwig
body: Thanks for the thorough answer. We do use Atlassian Access and all our users are in the domain so I should be able to disable 2FA on my workspace. Thank you!


Tags: authentication

bitbucket-cloud

cloud

jira-cloud
How to run same step for a list of libraries in parallel
Asked by Saurabh Kumar:

I am having bitbucket pipeline setup for an angular project. I have multiple libraries in the angular project and as part of pipelines I am running unit test for all of them in parallel.

Right now I have the steps defined separately for each library like below:

```
 - step: &test-directory-data-access
name: Execute directory-data-access unit tests
size: 2x # Double resources available for this step.
max-time: 7
script:
- cd dbaasui
- npm test "directory-data-access"
artifacts:
- dbaasui/coverage/**
- step: &test-directory-ui-directory
name: Execute directory-ui-directory unit tests
size: 2x # Double resources available for this step.
max-time: 7
script:
- cd dbaasui
- npm test "directory-ui-directory"
artifacts:
- dbaasui/coverage/**

```

and running them in parallel as below:

```
?- parallel:
#steps for directory
- step: *test-directory-feature-shell
- step: *test-directory-data-access
```

I want to know if there is a way wherein I can define a single step definition which takes in library name as a dynamic variable and run those in parallel .


Answers:
author: Halyna Berezovska
body: [@Saurabh Kumar](/t5/user/viewprofilepage/user-id/106271) pipeline script can take variable, but only through manual running.

```
test: &test
  step:
    name: Your pipeline with variable
    script:
      - test $var
```

```
custom-pipeline:
 - variables:
     - name: var
 - <<: *test
```

To do your tests automatically, you have to do it in separate steps:

test-lib1: \&test-lib-1

script:

- test folder

test-lib2: \&test-lib-2

....

Because the purpose of pipeline to be more declarative.

Or you can run test for folder by recongnizing how folder is called.

E.g. you have in work directory folder1 and folder2 and depending on what current directory is, you can run on it.

But it will be harder to debug in any case if you have some problems with pipelines, we would still recommend to use more declarative way.

Regards, Galyna


Tags: bitbucket-pipelines

cloud
Send parameters to Jenkins from WebHook
Asked by Mikica Peric:

I have setup a webhook in Bitbucket:

<https://confluence.atlassian.com/bitbucketserver068/managing-webhooks-in-bitbucket-server-981145446.html>

Which should trigger Jenkins build with parameters. Now I need to send a build parameter from Bitbucket to the Jenkins:

<https://wiki.jenkins.io/display/jenkins/parameterized+build>

Is it possible and how can I do it?


Answers:
author: Priya Darshini
body: Hi ,

I am looking for the solution ,

I have a same question ,

To trigger jenkins pipeline when PR is created , i need parameter to send from bitbucket to Jenkins .

Currently I am using bitbucket push and pull request plugin

The webhook is added in bitbucket . Need to send parameter ..

How to achieve this ?

Thanks


Tags: bitbucket-server

server
approval button not appearing on pull requests
Asked by amiddleton:

Hi

Since bitbucket has switched to the new pull request experience I don't see the approval or rework required buttons on the majority of the PRs. I do see them occasionally, but can't tell what's different.

To get around it, I had to switch back to the old PR experience.

I've tried using Chrome and Edge, and have disabled the bitbucket PR helper plugin.

Any ideas?

thanks in advance

Andy


Answers:
author: amiddleton
body: Update:

I've found a similar ticket [Self-approve Pull Request no longer possible (atlassian.com)](https://community.atlassian.com/t5/Bitbucket-questions/Self-approve-Pull-Request-no-longer-possible/qaq-p/1554714) which also points to a blog [Introducing a New Pull Request Status in Bitbucket Cloud: Changes Requested - Bitbucket](https://bitbucket.org/blog/a-new-status-for-pull-requests-in-bitbucket-cloud-changes-requested)

It is very confusing, but I think this is what is causing the issue, so I'll scrap this ticket.


Tags: bitbucket-cloud

cloud
Should a pipeline run agains a PR from a forked repo?
Asked by jcleach:

I have a private repo that a developer created a private fork of. When they created a PR the pipeline didn't run and no code quality metrics ran agains it. I'm curious if this is normal or if the pipeline should run agains a submitted PR?

Seems like this scenario in GitHub would run the Workflow agains the PR so I know if its a quality (test / lint / sonar / etc).


Answers:
author: jcleach
body: I think the answer to this is \*\*no\*\* which is a huge same. The reasons the triggers run agains a source branch not the destination branch. In the case of a source branch is part of a different repository.

This is a huge problem because you can't run code quality / tests \*\*before\*\* you merge. This makes forking on bitbucket useless.

Oh Bitbucket ?


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Bitbucket Pipeline, Google App Engine, pyodbc
Asked by Daniel Mossie:

Hey there,

I am attempting to deploy my software from a cloud bitbucket repository to Google App Engine using the google-app-engine-deploy bitbucket pipeline \[1\].

My application is written in python, and now requires the pyodbc pip library in order to connect to a SQL Server. In order to get this pip package to install, you first must install unixodbc-dev with \`apt-get -y install unixodbc-dev\`, otherwise you get a missing dependency error.

I am currently getting this missing dependency error in my pipeline, I believe this is because the google-app-engine-deploy pipeline \[1\] does not include this library.

Is there a workaround I can use to deploy my application? Or would it be possible for the pipeline to install this package, to allow me to install all of my requirements.txt?

**Screenshots:**

My pipeline step that is failing:

![screenshot-bitbucket.org-2020.12.16-12_41_48.png](https://community.atlassian.com/t5/image/serverpage/image-id/122423i2F265BC9EB9BFC26/image-size/large?v=v2&px=999 "screenshot-bitbucket.org-2020.12.16-12_41_48.png")

The error in the step:

![screenshot-bitbucket.org-2020.12.16-12_41_14.png](https://community.atlassian.com/t5/image/serverpage/image-id/122424i3ED954D6F0AE0676/image-size/large?v=v2&px=999 "screenshot-bitbucket.org-2020.12.16-12_41_14.png")

<br />

Thank you,  
Daniel

\[1\]<https://bitbucket.org/atlassian/google-app-engine-deploy/src/master/>


Answers:
author: Halyna Berezovska
body: [@Daniel Mossie](/t5/user/viewprofilepage/user-id/1776588) what image do you use for this step (or for all steps)? python:3.8? I mean, not in google-app-engine (however I will check it out)

It says that there is no sql installed (fully or properly).

comments: author: Halyna Berezovska
body: Can you share also with us requirements in your lib in setup.py?

Specifically, pyodbc, what version is it?


Tags: bitbucket-pipelines

cloud

google
Should I be able to edit pull request details?
Asked by jcleach:

If a developer creates a private fork of a private repo (that my org owns) should I (the admin) be able to edit the details of a pull request back into the master repo? I keep getting told I don't have permissions to edit the PR. Seems weird.


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

This should be possible if you are an admin of the destination repo.

When and where do you see the message that you don't have permissions to edit?

Is it when you select the **Edit** link? Or does the **Edit** link work, and you get an error when you select **Update pull request**?

Could you also please let us know what type of change are you making?

Kind regards,  
Theodora

comments: author: jcleach
body: I can edit a PR if it is created in my repo. If a developer forks a repo, then creates a PR, I am not able to edit the PR. When I have time I'll re-do the experiment with the developer to verify.


Tags: bitbucket-cloud

cloud
Diff colors have changed to blue and yellow
Asked by Conor Cleary:

Recently the diff colors in the pull request view have changed. They were originally green for additions and red for deletions but I am now seeing blue for additions and yellow for deletions (see screenshot below). I can't find any documentation of when this change may have occurred and also am not able to figure out how to switch back to the standard green and red color scheme.  

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

Screenshot truncated to show as little potentially sensitive data as possible.


Answers:
author: Tyler T
body: Hi [@Conor Cleary](/t5/user/viewprofilepage/user-id/4197127) and welcome to the Community. It appears you have **accessibility colors** turned on.

Click the gear icon near the top of your pull request and uncheck **Color accessibility**.

![Screen Shot 2020-12-17 at 10.05.12 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/122526i29477205386B7B19/image-size/large?v=v2&px=999 "Screen Shot 2020-12-17 at 10.05.12 AM.png")

comments: author: Conor Cleary
body: Thanks Tyler!


Tags: bitbucket-cloud

cloud

pull-request
how to turn off this atlassian 'help' popup which is locking the whole screen?
Asked by sadiewelsh:

trying to approve a pull request, i get a new popup from atlassian which greys out the whole screen. it is 'showing' me their new exciting features on a pull request! there is no scrollbar, it overfills the screen. i can't escape, hit enter, i have rebooted, reloaded the pull requests and this thing just pops up again. i can't close it, scroll, or get to any of my pull requests now. anyone else having this issue and if so how in the world do you get to your code.


Answers:
author: Tyler T
body: Sorry about that.. can you provide a screenshot? Have you tried using the "-" minus key to make the screen size smaller.. that might be a way for you to dismiss the dialog.

comments: author: sadiewelsh
body: Hello, yes I also tried minimizing the screen, using the arrow keys, dragging it to my second screen, but it still didn't show a scroll. I even logged in from another laptop and it refused to let me pass the screen unless i hit the 'got it' button (which i can't access since it is below the fold).

i was able to find someone else who had a much larger screen, plug into that, so i could see the 'got it' button that i had to click.

would suggest not requiring a user to hit 'got it' to get past a full lock down of the screen (all menus on the atlassian window, couldn't get to even my other repo's once it locked). give us some other manual way around atlassian announcements.


author: Tyler T
body: Thank you for the reply. I just tried this and was able to dismiss the pop-up with the enter key.

I will pass your feedback on to the design team. The escape key should also clear the pop-up.


Tags: bitbucket-cloud

cloud
API 2.0 Find files in a branch
Asked by StuMid:

Hey all,

Using the API and running this query for example...

<https://api.bitbucket.org/2.0/workspaces/MyWorkspace/search/code?search_query=myfile.json+repo:myrepo>

returns only myfile.json if it exists in the Master branch of the "myrepo" repo. I can't find any information on how to search within another branch.

How can I alter this search to search either a specific branch or the entire repo?

Thanks...


Answers:
author: seanaty
body: [@StuMid](/t5/user/viewprofilepage/user-id/1087541) the code search API only indexes the main branch so you're correct that you can only use this API with that branch to search file *contents*.

That said, you can use the src API to fetch files from any branch given that you know the filename.

<https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/src/%7Bcommit%7D/%7Bpath%7D>

You can use a branch name where it says "commit" but there is an annoying limitation that the branch name cannot contain a slash. If the branch name contains a slash you'd have to take a 2 step approach and first look up the commit of the branch using the branch API.

comments: author: Adolfo Perez Solis
body: Reading the documentation seems like you also need to know the path in addition to the filename when using the src API you suggested isn't it? In 2023 isn't still an easy way to search for files in a given branch? Without knowing the full path of the file


Tags: bitbucket-cloud

cloud
I'm not receiving password recovery & invitation mails from Atlassian
Asked by 294boy:

Hi

i can not receive password recovery mail from atlassian

Even though i can receive emails from the 'Atlassian-Community',

My email address is 294boy@gmail.com

@)

I've checked my spam mails already, not there


Answers:
author: Theodora Boudale
body: Hi [@294boy](/t5/user/viewprofilepage/user-id/4196655) ,

I checked our email logs and I saw some hard bounce events for this email, which may be related to recent Google outages.

I went ahead and triggered a password reset email for your Atlassian account just a few minutes ago, and our logs show that this one has been delivered.

Could you please confirm if this is the case?

I would also like to ask if you could ask the admins that sent you an invitation for an Atlassian Cloud product, to send it one more time now.

Any previous invitations were dropped, but at the moment I can't find your email in any suppression list, so new invitations should come to your Inbox.

Please feel free to let me know if there are still any issues.

Kind regards,  
Theodora

comments: author: 294boy
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086)

I got the recovery mail. Thx.


Tags: bitbucket-cloud

cloud
Does Bit bucket support AWS EFS ? What other alternatives available for NFS DR replication?
Asked by Karthick Krishnan:

Hi All,

I would like to know if Bit bucket would support AWS EFS as NFS solution. I see in the FAQ that AWS EFS is not supported by Bit Bucket. If not, what other storage options are supported as NFS solution

Thanks

-Karthick


Answers:
author: Cihan
body: Hello,  

Yes, Bitbucket DC supports AWS EFS as stated in [Bitbucket FAQs - Does Bitbucket Data Center clustering support Amazon EFS](https://confluence.atlassian.com/enterprise/bitbucket-data-center-faq-776663707.html#BitbucketDataCenterFAQ-DoesBitbucketDataCenterclusteringsupportAmazonEFS?) but be aware that if you've migrated all Git repositories from the Bitbucket shared home directory to Bitbucket Mesh, and also it's not recommended to use AWS EFS in case you have Git LFS.  

Regards,  
Cihan


author: Halyna Berezovska
body: [@Karthick Krishnan](/t5/user/viewprofilepage/user-id/4196561) can you specify in more detail:

do you want to use Bitbucket Cloud as NFS as storage or do you want to be able to deploy to AWS EFS cloud through Bitbucket Pipelines?

Currently, the first approach is not that Bitbucket Cloud for, but the second one sounds interesting. But anyway we want to clearify your needs.

Regards, Galyna

comments: author: Pavan Dronamraju
body: Galyna,

This is the same issue we are facing as of now. we tried sharing the "$Bitbucket_home/shared" folder over AWS EFS.  
we created sample files on individual instances and were able to see those available on shared mount space.

When you say not supported what exactly is not supported? Does it have any impact on Hazelcast clustering and members joining the cluster ?

Thanks

Pavan


author: Halyna Berezovska
body: [@Pavan Dronamraju](/t5/user/viewprofilepage/user-id/4450739) I did not say it is not supported. To say if something is supported or not, we need more clear problem understanding

If we talk about aws efs - we just do not have bitbucket PIPE like this. but you still can execute any code in bitbucket pipelines that is recognized by bash, including aws cli options, some code that is presented as custom bitbucket pipe, where you can write code in any language. This is up to you.

But as I see for now - you're facing the problem with mounting in pipeline.

Could you share the part of pipeline, so that we can understand the problem more clear? I suspect, you have some issues with mounting folders - that can be, I believe, Bitbucket Pipelines do some restrictions, BUT to understand, what exactly is happening, we need that pipeline code (may be with not real names, but with real structure) to say you more and see the root cause. Now the problem description is too abstract and lacks details.

Regards, Galyna


Tags: bitbucket-pipelines

nfs

server
File folder creation
Asked by Azaan sheriff:

Could someone help/advise me on creating a file folders in confluence page?


Answers:
author: Anastasia Bek _Stiltsoft_
body: Hello Community,

Thank you for mentioning our app.

With [Smart Attachments for Confluence](https://marketplace.atlassian.com/apps/1219123/smart-attachments-for-confluence?hosting=datacenter&tab=overview&utm_source=atlassian-community&utm_medium=answer&utm_campaign=smart-attachments-confluence-traffic-sources&utm_id=1216111&utm_content=file_folder_creation), you can upgrade document management in Confluence. The app allows you to:

* store important project documents organized
* create the [multi-level structure](https://docs.stiltsoft.com/display/public/SAFC/Managing+folders?from=app-marketplace-more-details) of folders
* [preserve document revisions](https://docs.stiltsoft.com/display/public/SAFC/Managing+documents#Managingdocuments-Managingdocumentrevisions) for change traceability
* [import folders with files](https://docs.stiltsoft.com/display/public/SAFC/Managing+folders#Managingfolders-Uploadingfolderswithdocuments) into Confluence with their structure recreation
* [tag documents with labels](https://docs.stiltsoft.com/display/public/SAFC/Managing+documents#Managingdocuments-Managinglabelsofdocuments) for better searchability
* and more

Please see the example below.

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

You can try the app for free or [contact our support](https://stiltsoft.customercase.com/forums/support-requests/ideas/create?category=Smart%20Attachments%20for%20Confluence) for details.

Cheers,

Anastasia


author: Dave Mathijs
body: Hi [@Azaan sheriff](/t5/user/viewprofilepage/user-id/5147582) welcome to the Atlassian Community!

Out-of-the box, attachments are not stored in folders on/in a Confluence page/space.

Paid third-party app [**Smart Attachments for Confluence**](https://marketplace.atlassian.com/apps/1219123/smart-attachments-for-confluence?hosting=datacenter&tab=overview) does provide this feature.


Tags: confluence-server

server