youngmon/atlassian-qna huggingface dataset:
Pipeline failure in monorepo (NPM Workspaces) when importing local package during build (Vite)
Asked by bouharri:

Did as much troubleshooting as reasonable (e.g., mocking pipeline locally in Docker, listing installed packages in pipeline, various config file placements, etc) but I could not get past this issue:

```
[vite]: Rollup failed to resolve import "core/style.css" from "/opt/atlassian/pipelines/agent/build/packages/ui/src/index.ts"
```

My monorepo was symlinking **core** from the **packages/** directory that **ui** is in, and is the only issue that I can think of because isolating the **ui** package from the NPM workspaces setup made the build complete successfully in the pipeline. Any ideas?

Pipeline as follows:  

```
image: node:22

pipelines:
  tags:
    "@org/ui-*":
      - step:
          name: Build
          caches:
            - node
          script:
            - cd packages/ui
            - npm install
            - npm run build // FAILS HERE
          artifacts:
            - packages/ui/dist/**
      - step:
          name: Publish
          script:
            - pipe: atlassian/npm-publish:1.1.0
              variables:
                NPM_TOKEN: $NPM_TOKEN
                FOLDER: ./packages/ui

    "@org/core-*":
      - step:
          name: Build
          caches:
            - node
          script:
            - cd packages/core
            - npm install
            - npm run build // DOESN'T FAIL (no local dependencies)
          artifacts:
            - packages/core/dist/**
      - step:
          name: Publish
          script:
            - pipe: atlassian/npm-publish:1.1.0
              variables:
                NPM_TOKEN: $NPM_TOKEN
                FOLDER: ./packages/core
```


Answers:
author: Nicolas Grossi
body: Did you tried removing node_ module before install ?

Nicolas

comments: author: bouharri
body: Node_modules is gitignored in the repo, so it shouldn't be there when it gets pulled. I have deleted the Node cache, to no effect.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

npm
Unable to login to bitbucket.org
Asked by Dmitri Chubarov:

When I try to open bitbucket.org, I get HTTP Error 400 and a webpage with the message:

We couldn't log you in {#toc-hId--354357466}
--------------------------------------------

You may run into this issue when you use specific browsers or add-ons that hide the referer header for id.atlassian.com and other Atlassian sites. Check for these and then try logging in again.

I have tried several browsers and came to conclusion that the problem might be with my account, not the browser or any add-on.


Answers:
author: Nicolas Grossi
body: [@Dmitri Chubarov](/t5/user/viewprofilepage/user-id/5525137) What type of license do you have ?

Nicolas


author: Patrik S
body: Hello [@Dmitri Chubarov](/t5/user/viewprofilepage/user-id/5525137) ,

welcome to the Community!

Checking internally, I see your account was inactive due to a long period with no activity.

I have already set the account to Active again, so you should be able to log in as usual.

Let us know in case you are still facing issues when signing in.

Thank you, [@Dmitri Chubarov](/t5/user/viewprofilepage/user-id/5525137) !

Patrik S


Tags: bitbucket-cloud

cloud
Repository variables are case in-sensitive
Asked by Michal Czuper:

When adding new repository variables we've noticed that they're case in-sensitive.  
i.e. we're trying to add a \`HTTPS_PROXY\` variable along with a \`https_proxy\` variable.  

However the second one fails with error \`Variable name must be unique.\`.  
It does not, it's an environment variables and it's unique due to its case.  

Unfortunately there is no standard for proxies in linux and different tools use one or the other version of the environment variables.


Answers:
author: Theodora Boudale
body: Hi Michal and welcome to the community!

Environment variable names are case-sensitive in Linux, but they are not case-sensitive in Windows. We have customers who use repository variables in Pipelines builds running with self-hosted Windows runners.

If the value of HTTPS_PROXY is the same for all repos in the workspace, you could use a workspace variable for HTTPS_PROXY (and a repository variable for https_proxy). Another option is to define the second variable in the bitbucket-pipelines.yml file with a command in the script of the step that needs it. You could also define these variables in a file stored in your repo and then source the file in the yml file, in the script of the step that uses them.

Kind regards,  
Theodora


author: Nicolas Grossi
body: [@Michal Czuper](/t5/user/viewprofilepage/user-id/5524404) Welcome! You might want to contact support.atlassian.com as you have a premium account.

Nicolas


Tags: bitbucket-cloud

cloud

environment

variables
Only allow merge when all checks are accomplished
Asked by Sergio A:

Hello!

I have the following branch restriction configuration in my repository:  

![2024-06-20_12-42.png](/t5/image/serverpage/image-id/330837i2D7626993D715F6F/image-size/large?v=v2&px=999 "2024-06-20_12-42.png")

As you can see we have three checks that all Pull Requests should accomplish. As I'm part of the ***aie.team*** group I'm able to merge the Pull Requests. I would like to give my developers permissions to merge its own Pull Requests but only if the checks are resolved.

The problem came when I have a Pull Requests with unresolved checks, even if the checks are unresolved I'm able to merge the Pull Requests. Is there any option to give my team permissons but just when all checks has been confirmed?

Regards!


Answers:
author: Nicolas Grossi
body: [@Sergio A](/t5/user/viewprofilepage/user-id/5407544) You might take a look at this thread: <https://community.atlassian.com/t5/Bitbucket-questions/merge-pullrequest-under-certain-condition/qaq-p/594485>

Nicolas

comments: author: Ben
body: Hi [@Sergio A](/t5/user/viewprofilepage/user-id/5407544)

The only want to enforce these merge checks is via a **Premium** plan as this is a premium feature.

You can prevent a merge from proceeding with unresolved merge checks by navigating to **Repository Settings \> Branch Restrictions** and enabling the **Prevent a merge with unresolved merge checks** option within the **Merge Settings**tab on the target branch:

* <https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-use-custom-merge-checks/>
* <https://support.atlassian.com/bitbucket-cloud/docs/suggest-or-require-checks-before-a-merge/>

Cheers!

- Ben (Bitbucket Cloud Support)


author: Sergio A
body: I see. Thank you [@Nicolas Grossi](/t5/user/viewprofilepage/user-id/676185) for the link!


author: Ulrich Kuhnhardt _IzymesCo_
body: Hello [@Sergio A](/t5/user/viewprofilepage/user-id/5407544)

You may also explore Bitbucket cloud apps on the Atlassian Marketplace that facilitate your pull request review and merge process, including enforcing merge conditions.

We have built [Workzone for Bitbucket Cloud](https://marketplace.atlassian.com/apps/1211303/workzone-pullrequest-workflow?hosting=cloud&tab=overview) for enterprise level pull request workflows including

* File/path reviewers and groups, added when the PR is created or updated
* fine grained **enforced** merge control, including group approval quota, build results etc (Bitbucket premium is not required)
* Intuitive configuration UI on Workspace, project or repo level.

Please check out [Workzone](https://marketplace.atlassian.com/apps/1211303/workzone-pullrequest-workflow?hosting=cloud&tab=overview) and other apps that may improve your pull request workflow and save your team a lot of time.

Best, Ulrich

// [Izymes](https://marketplace.atlassian.com/vendors/1210584/izymes-pty-ltd)


Tags: bitbucket-cloud

cloud
Git over SSH seems to fails sometimes (started today)
Asked by Alexander Yaskevich:

Hello,

There seems to be "flashing" issue with git over SSH. Simple commands tend to fail around half of the time

```
git fetch --tags --force origin
git pull origin master
```

Sometimes working, sometimes there is connection error:
> Connection to bitbucket.org closed by remote host.   
> fatal: Could not read from remote repository.  
>
> Please make sure you have the correct access rights  
> and the repository exists.

Even \`ssh git@bitbucket.org host_key_info\` sometimes fails. When it's not failing, I receive this:

> You are using host key with fingerprint: ssh-ed25519
>
> SHA256:ybgmFkzwOSotHTHLJgHO0QN8L0xErw6vd0VhFA9m3SM

Seems valid according to <https://bitbucket.org/blog/ssh-host-key-changes>

Fun fact: it's been exactly one year since Bitbucket replaced their host keys. So maybe related?


Answers:
author: Alexander Yaskevich
body: [Status page](https://bitbucket.status.atlassian.com/) says everything is ok, but also there was some maintenance, so maybe related.

Anyone else having issues?


author: Alexander Yaskevich
body: Issue seems resolved now.


Tags: bitbucket-cloud

cloud
how to add the exiting bitbucket to the atlassian organization
Asked by Bala Arjun K P:

how to add the exiting bitbucket to the atlassian organization


Answers:
author: Nicolas Grossi
body: [@Bala Arjun K P](/t5/user/viewprofilepage/user-id/5523321) Welcome! You might take a look at this link: <https://support.atlassian.com/organization-administration/docs/add-a-new-product-to-your-organization/>

Nicolas


author: Theodora Boudale
body: Hi [@Bala Arjun K P](/t5/user/viewprofilepage/user-id/5523321) and welcome to the community!

If you have Atlassian Guard (formerly known as Atlassian Access), you can check the documentation that Nicolas shared for the steps to link the workspace to your organization.

This will allow you to view Bitbucket Cloud Audit Logs in the organization's Audit Logs. The workspace will also be listed in your organization's product list. Please keep in mind that ++unified user management will not be available for the workspace++. This functionality will be released in 2025 for existing, older, workspaces. This is a longer timeframe because it requires migrating existing user history and permissions over to Atlassian Admin.

Please feel free to reach out if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Redirect Page after Repo Deletion
Asked by Thomas:

I deleted a repository and set an URL for a redirect page that will be displayed. I missed the information that the redirect page will be public.

**Suggestion for Product Improvement**

I'd like to suggest an improvement to Bitbucket:

Can you make "We'll display this link to anyone who visits the deleted repository" more prominent, maybe use warning colours and change the wording (for example use "public accessible" rather than "to everyone who visit the deleted repository")?

![Screenshot 2024-06-19 133452.png](/t5/image/serverpage/image-id/330680iE61BCC99A7232EB1/image-dimensions/365x182?v=v2 "Screenshot 2024-06-19 133452.png")

**Solution to remove/change Redirect Page**

Anyways, for those who want to get rid of the redirect page (or update the URL):

Create a new repository with the same name and then delete the repository again without setting the URL (or use an updated URL).


Answers:
author: Patrik S
body: Hello [@Thomas](/t5/user/viewprofilepage/user-id/5523667) ,

and welcome to the Community!

I really appreciate your time in sharing the feedback, and I definitely agree there's room for improvements in the messaging of that deletion page. That being said, I went ahead and raised an enhancement request with our engineering team contemplating your suggestions:

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

We encourage you to add your **Vote** to help our product team understand the interest and increase the request's visibility. If you would like to be notified of any future updates on that ticket, you can also mark yourself as a **watcher**.

Thank you, [@Thomas](/t5/user/viewprofilepage/user-id/5523667) !

Patrik S


author: Thomas
body: I hope this helps others. It took me a while to come up with this very simple solution and I did not find any information about how to get rid of the redirect page.


Tags: bitbucket-cloud

cloud

delete

git

redirect

repo
Issue with pull requests
Asked by Shiva Kumar:

When a X branch PR is raised to Y branch, we see no changes when we create a pull request.  
But the same when we compare the code on any IDE between X and Y using git we see changes and differences in the code.  

What is the reason, have bit bucket made any recent changes for this to occur?


Answers:
author: Patrik S
body: Hello [@Shiva Kumar](/t5/user/viewprofilepage/user-id/5524283) ,

and welcome to the Community!

Based on your description, I suspect it may be due to different ways of calculating the diff between Bitbucket Cloud and the IDE tool you're using . In git, you can use three-dot diff or two-dot diff to compare two branches (see [Differences between double-dot and triple-dot in Git diff](http://What are the differences between double-dot ".." and triple-dot "..." in Git diff commit ranges?))

Bitbucket Pull requests compute the diff(topic diff) between the source branch HEAD and the common-ancestor (merge-base) . The [merge-base](https://git-scm.com/docs/git-merge-base) is the point in history where the branches started to diverge. This is also known as three dot diff, with the equivalent command of executing that diff locally being :

```
git diff destination_branch...source_branch
```

In this case, could you please confirm if executing that same command locally and providing the same X and Y branches you used to create the pull request in the UI results in a different output?

Thank you, [@Shiva Kumar](/t5/user/viewprofilepage/user-id/5524283) !

Patrik S


Tags: bitbucket-cloud

cloud
Not able to expand/view full pipeline build logs
Asked by Aishwarya Sarangapani:

My pipeline is throwing Null Pointer Exception Error:

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

I am not able to expand/view the last bit of error message (*... 23 more*). I tried multiple ways to read entire error message but nothing works. I tired --log-file and artifact option. I believe that last bit of message may have useful information like which column/table is missing from target DB.

Kindly help me to read error the message.


Answers:
author: Syahrul
body: G'day, [@Aishwarya Sarangapani](/t5/user/viewprofilepage/user-id/5523973)

Welcome to the community!

I don't think this issue is related to Pipeline itself but rather to how the Java stack trace treats duplicate errors. I suggest reviewing the following discussion to understand this behavior and trying the suggested workaround there:

<https://stackoverflow.com/a/437767>

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud
How can i see pr review
Asked by ???:

reviewer already wrote review in pull request, but i can't confirm review anywhere


Answers:
author: Patrik S
body: Hello [@???](/t5/user/viewprofilepage/user-id/5523997) ,

and welcome to the Community!

If a reviewer has already written a review on a pull request in Bitbucket Cloud, you should be able to see their comments directly on the pull request page. The reviewer's feedback will typically be visible in the conversation thread associated with the pull request.

To access and view the review, navigate to the specific pull request that the reviewer has added comments to. Then, scroll through the conversation and look for any comments and suggestions made by the reviewer.

Once your done with any changes suggested by the reviewer, you can communicate directly with them and ask them to Approve the pull request, so you can proceed with merging it.

I hope that helps! Let me know in case you have any questions.

Thank you, [@???](/t5/user/viewprofilepage/user-id/5523997) !

Patrik S

comments: author: ???
body: Thank you for your reply

i'm already know it and i saw different review other developer pull request.

Reviewer captured that review and send me. but i cant just see reviews for my pr


author: Patrik S
body: Hey [@???](/t5/user/viewprofilepage/user-id/5523997) ,

I'm not sure if I followed your description of the issue. You should be able to access other developers' pull requests as long as you have access to the repository to which the pull request belongs.

Could you please provide more details about your use case and perhaps any screenshot that would help us to better understand what's happening and what you are trying to achieve?


Tags: bitbucket-cloud

cloud
rysnc in pipline not working
Asked by shanedara:

hello i am trying to push files from bitbucket to an aws lightsail instance. I am using rsync in my pipeline file. I have set up a specific user and added the repository public ssh key to the authorized_keys file on the lightsail instance. I keep getting a permission denied fault. I think that bitbucket is not specifying the private ssh key when it tries to connect. I am not sure why. here is the line in my pipeline yaml file that does the rsync deployment. Do i need to specify the location of the private key in this line?  
- step: \&deployment  
name: first deployment to production  
script:  
- rsync -azvSOP --delete --rsync-path="sudo rsync" --no-perms --no-owner --no-group --exclude-from=./deployment-exclude-list.txt --include=./views/twig/cms/my-cart-cms-additions.html --include=./views/twig/cms/main-assets.html ./ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH


Answers:
author: Oleksandr Kyrdan
body: Hi [@shanedara](/t5/user/viewprofilepage/user-id/5523585)

Thanks for your question!

It is a good case for the Bitbucket Pipe usage!

As an example, you could use [atlassian/rsync-deploy pipe](https://bitbucket.org/atlassian/rsync-deploy/src):

*Deploy your code to any server over ssh using rsync. By default it will upload the whole directory to the target. Rsync is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination.*
> By default, the RSYNC pipe will automatically use your configured SSH key and known_hosts file configured from the [Bitbucket Pipelines administration pages](https://support.atlassian.com/bitbucket-cloud/docs/using-ssh-keys-in-bitbucket-pipelines/). You can pass the `SSH_KEY` parameter to use an alternate SSH key as per the instructions in the docs for [using multiple ssh keys](https://support.atlassian.com/bitbucket-cloud/docs/use-multiple-ssh-keys-in-your-pipeline/)

```
script:  - pipe: atlassian/rsync-deploy:0.12.0    variables:      USER: 'ec2-user'      SERVER: '127.0.0.1'      REMOTE_PATH: '/var/www/build/'      LOCAL_PATH: 'build'      DEBUG: 'true'      EXTRA_ARGS:        - "--filter=P assets/css" # double quotes here are necessary        - "--exclude=*.txt"
```

To discover more pipes, visit our [**Bitbucket Pipes Marketplace**](https://bitbucket.org/product/features/pipelines/integrations).

Best regards,  
Oleksandr Kyrdan


Tags: bitbucket-cloud

cloud

ssh
Created new workspace using free bitbucket - Resource not found
Asked by John Realino de Veyra:

Apologies but I'm new here.  
Here are the steps that I did.  

I wanted to create a workspace/repo using free bitbucket. Created a workspace - "workspaceA" - this then now created a new ORGANIZATION - "test-org". I tried to delete the organization as I thought I made a mistake.  
So, I deleted it and the Bitbucket product is now on Pending Removal.  
I asked my seniors if creating a new org is fine, they said it was okay. So, I tried to undo the pending but can't seem to find it, so I created a new workspace - "workspaceB" - (using Bitbucket again) with "test-org" organization.  

Now the problem is when I try to open that new workspace - 404-Bitbucket occurs or Error-Bigbucket occurs (using Open Bitbucket or Bitbucket Settings on Adminstration/Overview page).  

Is this somehow related to the first workspaceA I created that was on pending removal?  
Is there a way I can use workspaceB?


Answers:
author: Syahrul
body: G'day, [@John Realino de Veyra](/t5/user/viewprofilepage/user-id/5523989)

Welcome to the community!

My question is, are you sure you have opened the correct Bitbucket workspace? This error typically shows up when an invalid workspace is opened. Try accessing the workspace directly using the following URL:

<https://bitbucket.org/>\<Workspace-Slug\>

Let me know how it goes.

Regards,  
Syahrul

comments: author: John Realino de Veyra
body: Hi [@Syahrul](/t5/user/viewprofilepage/user-id/744536),  

Thanks for the reply. I've tried directly accessing the url and 404 still occurs.  

Regards,  
John


author: Syahrul
body: Hi [@John Realino de Veyra](/t5/user/viewprofilepage/user-id/5523989)

Can you navigate to the Product \> Manged product on the Bitbucket workspace and check if there's a group in the workspace and if you are part of the group?

I want to make sure you have access to the workspace itself.

Regards,  
Syahrul


author: John Realino de Veyra
body: Hi [@Syahrul](/t5/user/viewprofilepage/user-id/744536)  

Yes, I am the only one with access and is a product admin.  

Regards,  
John


author: Syahrul
body: Hey [@John Realino de Veyra](/t5/user/viewprofilepage/user-id/5523989)

I have looked at your org, and I don't see any groups in it; hence, I believe this is why you can't access the workspace. Can you create a new group as a product admin and add them to the workspace to see if that works?

Regards,  
Syahrul


author: John Realino de Veyra
body: Hey [@Syahrul](/t5/user/viewprofilepage/user-id/744536)  

Added a new group and added myself and I can now access the workspace.  
Thank you for this!  

Regards,  
John


Tags: bitbucket-cloud

cloud
Setup pipeline with Docker - Connect via SSH Key and Password
Asked by Cedrik Baack:

Hi,

I want to set up Bitbucket Pipelines together with Docker. I find the documentation hard to understand and not straightforward.

I'm stuck on connecting to my dev server and then run docker compose up.

I wonder if there is any good documentation on how to connect via SSH key and password. Or if anyone has an example `bitbucket-pipeline.yml` file.

Thanks in advance!


Answers:
author: Oleksandr Kyrdan
body: Hi [@Cedrik Baack](/t5/user/viewprofilepage/user-id/5523172)

Thanks for your question!

You could look at this [answer](https://community.atlassian.com/t5/Bitbucket-questions/Re-How-to-properly-run-docker-compose-v2-on-bitbucket-pi/qaq-p/2568601/comment-id/100404#M100404).

Best regards,  
Oleksandr Kyrdan


Tags: bitbucket-pipelines

cloud

docker

ssh-key
GC Request
Asked by Aguirre_ Alan _ESI_:

I removed a big file from one of my repositories and I run filter-repo framework to re-write the commit tree, but the size of the repo is not decreasing. After a search, I understood that is necessary to run GC in the remote repo. I tried to follow some answers that say to execute git reset --hard HEAD\~1 and git push -f, to force the execution of a GC in the bitbucket remote, but without any success. Is it possible to run the GC in my remote repository? I can send the details in private.

Thanks,

Alan


Answers:
author: Syahrul
body: G'day [@Aguirre_ Alan _ESI_](/t5/user/viewprofilepage/user-id/5523543)

I have raised a support ticket on your behalf, please respond to them at:

<https://support.atlassian.com/requests>

Regards,  
Syahrul


author: Mikael Sandberg
body: Hi [@Aguirre_ Alan _ESI_](/t5/user/viewprofilepage/user-id/5523543),

Welcome to Atlassian Community!

One of the Atlassian Support Engineers that are on here will reach out to you in order to resolve this for you.


Tags: bitbucket-cloud

cloud