youngmon/atlassian-qna huggingface dataset:
Bit Bucket Password Reset
Asked by Eric Wallace:

Hello,

I don't know my password for Bitbucket and have tried to have several password reset emails sent to me, but I haven't seen any come through. My email is ewallace@wine.com. Can you help with this?


Answers:
author: Syahrul
body: G'Day [@Eric Wallace](/t5/user/viewprofilepage/user-id/4381636)

The reason why you can't request a password reset or received any password reset is that your account is managed by your organization and is using SSO/SAML for login flow.

So please reach out to your organization for assistance in resetting your account password if you still have issues to log in.

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
composer install failed : public/build/css missing
Asked by SALMI Bilal:

hi !

i'm very junior developer, I will try to explain as best I can

I'm trying to set up the CICD, my project is split into API / dasboard front

in my dashboard project, in my pipeline i run :

```
image: (php image dev 7.4)

pipelines:
   branches:
      main:
            - step:
                 name: test-unit
                 script:
                   - yarn install
                   - composer install --no-progress --dev --ansi -nv --prefer-dist --optimize-autoloader
```

the composer command fail because i don't have css directory

do i have to use the artifacts ? use the compose cache ? or anything ? thank you

![pip.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/142217iA7B1DB0F79CBE82E/image-size/large?v=v2&px=999 "pip.JPG")


Answers:
author: SALMI Bilal
body: EDIT :

fixed with :

```
- composer install --ignore-platform-reqs --no-scripts
```

instead of

```
 - composer install --no-progress --dev --ansi -nv --prefer-dist --optimize-autoloader
```


Tags: atl-pipelines

bitbucket-pipelines

continuous-delivery

docker

yarn
Object tagging format in EXTRA_ARGS
Asked by avikuma:

I want to add tags and the CLI commands for the same is like below:

aws s3api put-object-tagging --bucket DOC-EXAMPLE-BUCKET --key exampleobject --tagging 'TagSet={Key=public,Value=yes}'

In what format can I pass these in EXTRA_ARGS ?


Answers:
author: Halyna Berezovska
body: [@avikuma](/t5/user/viewprofilepage/user-id/3221207) please, share more details, which Bitbucket AWS Pipe you're using (we don't have there such feature, as I remember)

We can have this ability in many pipes that involve s3 buckets, so we need more details about your case.

Regards, Galyna


Tags: aws

bitbucket-pipelines

cloud
Restrict user from pushing document / binary files into the repository
Asked by Deepak Menezes:

As a Bitbucket Administrator, I want to maintain only source code in the all repositories and not any binaries / document/ pdf files. Is there any way to restrict user from pushing non source code files to Bitbucket server.


Answers:
author: Aron Gombas _Midori_
body: With the [Better Commit Policy](https://marketplace.atlassian.com/apps/1214430/better-commit-policy-for-bitbucket?hosting=server&tab=overview) app, you can enforce rules on changed files, commits, tags, branches, committers, etc.

One of the rule allows you to match regexes to the changed files. For example, it is possible to accept nothing else but modifications on *\*.java* and *\*.xml* files. We use it in production with great success for many years.


Tags: bitbucket-server

server
How to exclude jenkins file for pull request
Asked by naresh2389:

HI All,

How to exclude jenkinsfile for pull request from lower branchs to higher branches.We are getting conflicts for jenkinsfile between develop and Integration branches


Answers:
author: Syahrul
body: Hi [@naresh2389](/t5/user/viewprofilepage/user-id/4332553)

G'Day!

You can check out our KB below on how to exclude files from your pull request diffs. It's under your repositories settings \> **Pull requests** \> **Exclude files**

* [Exclude files from pull request diffs](https://support.atlassian.com/bitbucket-cloud/docs/exclude-files-from-pull-request-diffs/)

In the **Patterns**field, you may enter patterns to exclude from. your pull request, a pattern can be:

* a filename (e.g. index.min.js).

* a path relative to the repository root (e.g. /minified/index.min.js).

* a pattern including wildcards (e.g. \*.min.js or /minified/\*\* ).

I hope this helps.

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
Bitbucket error: Cant add more users
Asked by Srini:

bitbucket error:

\>\> the owner of this repository is already at their plan limit and will need to upgrade before adding more user

But we have a standard plan and pay as you use model. Not sure where the plan limit is coming from?


Answers:
author: Syahrul
body: Hi [@Srini](/t5/user/viewprofilepage/user-id/4137218)

G'Day!

This error indicates that the workspace you were invited to is not on the Standard plan hence you are receiving the error message.

To verify this, check the Workspace name that you were invited to and compare it with the one you upgrade to the Standard plan. If it's not the same then you were invited to another Workspace that is not on the Standard plan.

Currently, Bitbucket charges based on a Workspace. If you have two different workspaces (Workspaces A and WorkspaceB) and you upgrade Workspace A, it does not mean that you are upgrading both Workspaces. It only upgrades Workspace A and Workspace B will still be on the free plan.

I hope this helps!

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
git merge-base analog in Bitbucket Cloud and Server REST API?
Asked by Max:

Hello, is there some kind of analog of "git merge-base" command in Bitbucket Cloud and Bitbucket Server REST API?

Thank you in advance, Max


Answers:
author: Max
body: Found out

<https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/merge-base/%7Brevspec%7D>

Sorry, didn't see it


Tags: bitbucket-cloud

bitbucket-server

cloud
About access token
Asked by ikoan-amuk:

I can't find the link to generate my personal access token.  
Please let me know.


Answers:
author: Suhas P
body: HI,

You can find it under your profile section.

Profile\>\> Manage Account \>\> Personal Access Token.

comments: author: ikoan-amuk
body: Thank you.

I don't know yet.  
Just understand that this is a question from me after a lot of searching.

I need an access token to tie xcode to bitbucket.

By profile, do you mean the Atlassian page or the bitbucket page?

Or do I need to purchase a license to get an access token?

I would appreciate your answer.  
Please help.


author: Suhas P
body: Under your Bit Bucket user profile.

If you have an existing licensed BitBucket instance and valid user account. You don't need anything else.


author: ikoan-amuk
body: I can't find it under the Bit Bucket user profile either.  
Why is this?

![2021-05-06 10.01??????.jpeg](https://community.atlassian.com/t5/image/serverpage/image-id/142280iDB46B07885BB64EC/image-size/large?v=v2&px=999 "2021-05-06 10.01??????.jpeg")


Tags: bitbucket-server

server
kubectl-run pipe tries to write unmodifiable artifact
Asked by cgray:

I am trying to change our kubernetes yaml files so that they are generated by a tool. This tool creates the files and they are saved as artifacts and then passed to the step that runs the kubectl-run pipe. The kubectl-run pipe tries to modify these files and fails with the error

```
Traceback (most recent call last):
File "/pipe.py", line 121, in <module>
pipe.run()
File "/pipe.py", line 112, in run
self.handle_apply()
File "/pipe.py", line 77, in handle_apply
self.update_labels_in_metadata(template_file, labels)
File "/pipe.py", line 33, in update_labels_in_metadata
with open(template, 'w') as template_file:
PermissionError: [Errno 13] Permission denied: 'kubernetes/foo-service-staging-deployment.yml'
```

It appears that this is caused by the pipe attempting to add some metadata about the bitbucket build, etc. This metadata is nice but not necessary. It would be better if the pipe would wrap the write in a try/catch so that the pipe doesn't fail if it can't be added.


Answers:
author: Halyna Berezovska
body: [@cgray](/t5/user/viewprofilepage/user-id/2888294) i see one of possible root cause that you may set the owner while working with files or file that you will pass as RESOURCE_PATH variable.

If that helps you, try executing such lines before running a pipe:

chmod +rw $RESOURCE_PATH (adding -R option if resource path is a folder, not a single file).

Looking forward to see your feedback. In the meantime we'll try to reproduce this edgecase.

Thank you for raising question.

Regards, Galyna

comments: author: cgray
body: Yes that works. Thank you for your help.


Tags: bitbucket-pipelines
How to make my repo public? How do I know if I'm admin for my own project?
Asked by Kustaa Nyholm:

Hi,

I created a repo last week.

Now I have a problem for which I need help and I need to make the repo public.

I have googled and found advice like this:  

<https://confluence.atlassian.com/bitbucketserver/allowing-public-access-to-code-776639799.html>  

But I cannot find Myrepo / Settings / Repository / Permissions / Public access.  

Does that mean I don't have admin rights?

Do I not have admin rights to a repo I create myself last week?  

How do I know if I have access rights?

If I don't have them, how do I get them?

Been trying this for two hours now, I must be pretty dense as no one else seems to have these problems...


Answers:
author: Syahrul
body: Hi [@Kustaa Nyholm](/t5/user/viewprofilepage/user-id/4376663)

G'day!

The KB link you share is for the Bitbucket server, not for the Bitbucket cloud. If you are looking for how to make your Bitbucket cloud repositories public, navigate to the **Repositories settings** \> **General** \> It should be under **Access Level** there's a tickbox that you can untick to make it public repositories.

As for how to check your access, if you can see the repositories settings then you are the administrator of the repository and if you go up to the Workspace page and see the Workspace settings then you are the Workspace admin.

I hope this clears up the confusion, let me know if you have any additional questions.

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
Shallow update not allowed
Asked by finnruijter:

Hi there!

I'm trying to deploy a commit, but I'm getting a response that shallow update isn't allowed. In what way can I fix this issue?

Here's the log:

remote: git.wpengine.com: validating  
remote: - warning: changes will be deployed to production application ...  
remote: - info: validating files in XXX ...  
remote: - info: found application servers ...  
remote: - success: validation complete!  
To git@git.wpengine.com:production/XXX.git  
! \[remote rejected\] master -\> master (shallow update not allowed)  
error: failed to push some refs to 'git@git.wpengine.com:production/XXX.git'


Answers:
author: Jimmy Seddon
body: Hi [@finnruijter](/t5/user/viewprofilepage/user-id/4359549),

Welcome to the Community!

It looks like you are trying to push changes with a shallow clone of the git repository, which isn't an operation you can perform.

I'd recommend checking out this post here for more details on what you need to do to resolve your issue: <https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-pipeline-to-Heroku-fails-quot-Push-rejected-source/qaq-p/896046>

Basically, you are going to either need to perform a full clone (not a shallow one) or the push that you are performing needs to target the specific branch you have checked out.

I hope that helps!

-Jimmy


author: Christhoval Barba
body: Hello [@finnruijter](/t5/user/viewprofilepage/user-id/4359549)   
try my solution  

```
- step:
    script:
      - apk add git openssh-client
      - git remote add [name] <repo_url>
      - git remote -v
      - git pull
      - git checkout [branch]
      - git filter-branch -- --all
      - git push -u sync [branch]
```

Work for me


Tags: bitbucket-pipelines

cloud

deployment

git
How to create project in bit bucket using REST API or ansible playbook?
Asked by Shubham Gupta:

I was trying to find documents to guide me to create project in bitbucket using Rest API or ansible playbook but i am unable to find such documents please help.


Answers:
author: Pawe? Smolarz
body: Hi,

For Ansible please try use Ansible collection: <https://galaxy.ansible.com/esp/bitbucket> with modules for :

* bitbucket_application_link
* bitbucket_application_link_info
* bitbucket_branch
* bitbucket_branch_info
* bitbucket_branch_permissions
* bitbucket_branch_permissions_info
* bitbucket_clone
* bitbucket_copy
* bitbucket_default_branch
* bitbucket_directory_sync
* bitbucket_find
* bitbucket_project
* bitbucket_project_info
* bitbucket_project_permissions
* bitbucket_project_permissions_info
* bitbucket_project_reviewer
* bitbucket_pull_request
* bitbucket_pull_request_info
* bitbucket_push
* bitbucket_repo
* bitbucket_repo_info
* bitbucket_repo_permissions
* bitbucket_repo_permissions_info
* bitbucket_repo_reviewer
* bitbucket_slurp
* bitbucket_webhook

Regards,

Pawel


author: Charlie Misonne
body: Hi Shubham,

Welcome to the Atlassian Community!

The REST API of Bitbucket Server is documented. The main page can be found [here](https://developer.atlassian.com/server/bitbucket/reference/rest-api/).

But here is a direct link to the POST endpoint for creating projects: <https://docs.atlassian.com/bitbucket-server/rest/7.12.1/bitbucket-rest.html#idp147>

With Ansible I can't help you


Tags: ansible

bitbucket-server

rest-api

server
Does pipe Bitbucket trigger pipeline work with account which have 2 factor authentication?
Asked by t1279k:

I am trying to use [Bitbucket trigger pipeline](https://bitbucket.org/product/features/pipelines/integrations?p=atlassian/trigger-pipeline) . I have setup 2 factor authentication for my Bitbucket account. We need to provide username and password for the pipe to work. Looking at the source of the pipe if is using basic authentication.

*Basic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported). Note that Basic Auth with username and password as credentials is only available on accounts that have 2-factor-auth / 2-step-verification disabled. If you use 2fa, you should authenticate using OAuth2 instead.*

Ref: <https://developer.atlassian.com/bitbucket/api/2/reference/meta/authentication>

Will this pipe work for account which have 2 factor authentication. If not can this pipe be enhanced?


Answers:
author: Halyna Berezovska
body: [@t1279k](/t5/user/viewprofilepage/user-id/4306534) thanks for the question,

Our pipe is based on bitbucket api.

Bitbucket api have several methods to authenticate.

For now, you can setup app password and give it least granular permissions that are needed to execute (running pipeline permission, access to repositories for example etc.).

This is explained in the last section in the doc you mentioned.

The second way is to setup OAuth consumer which is also explained there. But this way is not supported right now in our pipe, BUT supported via Bitbucket Api. We will think about this update and discuss, it seems handy , useful and important change.

If you have setup 2factor for account, app password that we use still should work. E.g., it works for my account.I quote the sentence in doc mentioned:
> Some important points about app passwords:
>
> * You cannot use them to log into your Bitbucket account.
>
> * You can use them for API call authentication, even if you don't have two-step verification enabled.
>
Please, give us the feedback if it does not.

I guess, that basic auth there is mentioned in the way you cannot use your password to authenticate, but instead you still can create app passwords that are different from your password

However, we will also discuss the change to support Oauth consumers, it is nice suggestion, thanks.

Regards, Galyna


Tags: bitbucket-pipelines

cloud

trigger
Automate Pipeline to run on push
Asked by Jesse Schaaf:

I set up a pipeline to ftp my files to my hosting server through bitbucket. Works great. How can I set automate this so when I push changes to my remote branch it runs this pipeline?


Answers:
author: Halyna Berezovska
body: [@Jesse Schaaf](/t5/user/viewprofilepage/user-id/4375203) this is done automatically by webhooks when you push bitbucket as pipeline workflow called \`default\`.

If you want to run specific pipeline on specific branch you section \`Branch workflows\` in the doc <https://support.atlassian.com/bitbucket-cloud/docs/pipeline-triggers/>

Also read the section Keywords after this, there are also cases that may suit you (running specific pipelines on bitbucket tags, pull requests or even on branches with wildcard)


Tags: bitbucket-pipelines

cloud
can I find who download/clone my repo ?
Asked by Cesar Miles:

Can I see when some user download my repo or clone it ?

my repo is privately share with 5 users.


Answers:
author: Jimmy Seddon
body: Hi [@Cesar Miles](/t5/user/viewprofilepage/user-id/4375117),

Welcome to the Community!

I don't believe that cloning is an operation that is tracked by Bitbucket or Git for that matter. What are you trying to accomplish this this information?

Thanks!

-Jimmy

comments: author: Cesar Miles
body: I just want to know in my organization when or who download/clone the repo.

there are two ways to download repo

1. from the web interface of bitbucket
2. using the git clone command

**for option 1**

![Screenshot 2021-05-03 031212.png](https://community.atlassian.com/t5/image/serverpage/image-id/141608i23BECC5FC5F8C44E/image-size/large?v=v2&px=999 "Screenshot 2021-05-03 031212.png")

does bitbucket track this events ?


author: Jimmy Seddon
body: Hi [@Cesar Miles](/t5/user/viewprofilepage/user-id/4375117),

I just took a look through the REST API docs: <https://developer.atlassian.com/bitbucket/api/2/reference/resource/>

I don't see anything that looks like it would return the information you are looking for.

Sorry I can't offer much more help than that.

-Jimmy


author: Cesar Miles
body: [@Jimmy Seddon](/t5/user/viewprofilepage/user-id/512822) any suggestion ?


Tags: bitbucket-cloud

clone

cloud

download
Create a _new_ pipeline variable
Asked by Mary Sipple:

I have successfully modified pipeline variables with the API. Now I am trying to *create a new* pipeline variable using the API.

According to [the documentation](https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines_config/variables/) you should be able to create a new one using **/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/variables/**

The "request example" shows the inclusion of a pipeline variable uuid but since the variable does not exist, I do not have a uuid.

```
$ echo $request_body
{ "key": "test", "value": "setMe", "secured": "false" }
$ curl -X PUT -u "$BB_API_AUTH" https://api.bitbucket.org/2.0/repositories/workspace/repo/pipelines_config/variables -d "$request_body"
{"type": "error", "error": {"message": "Resource not found", "detail": "There is no API hosted at this URL.\n\nFor information about our API's, please refer to the documentation at: https://developer.atlassian.com/bitbucket/api/2/reference/"}}
```

I've tried with and without a slash after 'variables'.

```
$ curl -X PUT -u "$BB_API_AUTH" https://api.bitbucket.org/2.0/repositories/workspace/repo/pipelines_config/variables/ -d "$request_body"
{"type": "error", "error": {"message": "Method not allowed"}}
```

How can I create a *new* pipeline variable?


Answers:
author: Halyna Berezovska
body: [@Mary Sipple](/t5/user/viewprofilepage/user-id/3962477) in the second case you're using right url with / (<https://api.bitbucket.org/2.0/repositories/workspace/repo/pipelines_config/variables/>) , but somewhy use PUT http method.

PUT method is for existing resource, that means, for existing variable, if you want to change its value, for example.

To create a variable you have to use POST method for that

Regards, Galyna

comments: author: Mary Sipple
body: Of course! Thank you so much. It's working now.

Regards, Mary


Tags: bitbucket-pipelines
How to provide access to restricted pages in confluence
Asked by yasmeen shaik:

I am the admin of the space. But I am not able to provide access to the restricted pages created by other user within same space.

How to provide access to restricted pages in confluence.


Answers:
author: Kishan Sharma
body: Hi [@yasmeen shaik](/t5/user/viewprofilepage/user-id/5047883)   

Considering you are using Confluence DC/Server (since you haven't tagged the hosting type), you need space admin permissions to view the list of restricted pages in a space.

**To view restricted pages:**

1. Go to the space and choose **Space tools** \> **Permissions**from the bottom of the sidebar

2. Choose **Restricted Pages**.

From the next screen, you can right click and open the restricted pages and then add further restrictions to them with below steps:

1. Choose the Restrictions ![](https://confluence.atlassian.com/doc/files/139414/945098807/178/1680132725675/restriction-icon-grey.png) icon at the top of the page.
2. Choose whether you just want to limit only who can **Edit** , or who can **View and / or Edit** .
3. Enter users or groups then click **Add** to add them to the list.   
   If you chose **Viewing and Editing restricted** you can further specify for each person or group whether they can edit or just view the page.
4. **Apply** the restrictions.

The restrictions are inherited from parent page which might affect how you can view/edit/add restrictions on the page. View restrictions are inherited, which means a restriction applied to one page will cascade down to any child pages. Edit restrictions are not inherited, which means pages need to be restricted individually.   

Please also have a look at the following links to learn more about the permissions

* [Page Restrictions](https://confluence.atlassian.com/doc/page-restrictions-139414.html)
* [Space Permissions Overview](https://confluence.atlassian.com/doc/space-permissions-overview-139521.html)

Let me know if this helps.
Meeting minutes page content not publishing completely
Asked by Nilesh Dhameja:

I am able to publish this page but the contents is not fetching completely

<https://confluence.nttltd.global.ntt/x/Dr2GF>

Getting below error :-

1.2. Attendants {#toc-hId--469850506}
-------------------------------------

**Error rendering macro 'table-data'**

XML Parsing exception

1.3. Meeting Topics {#toc-hId-2017662327}
-----------------------------------------

| Owner | Topic |
|-------|-------|

1.4. Meeting Minutes {#toc-hId-210207864}
-----------------------------------------

| Owner | Minute |
|-------|--------|

1.5. Action Items {#toc-hId--1597246599}
----------------------------------------

**Error rendering macro 'table-data'**

XML Parsing exception


Answers:
author: Alex Koxaras _Relational_
body: Hi [@Nilesh Dhameja](/t5/user/viewprofilepage/user-id/5187447) and welcome to the community,

Did you check the log files? What does it say about this error?