youngmon/atlassian-qna huggingface dataset:
Showcase a repository to an extern user without granting cloning access.
Asked by michailtam:

Hello, I want to showcase one of my repositories to a user which has no account on bitbucket. I only want to grand read-only access without the possibility of cloning the repository. Is this possible? An how?


Answers:
author: Patrik S
body: Hello [@michailtam](/t5/user/viewprofilepage/user-id/2198274) and thank you for reaching out to Community!

The least privileged permission in Bitbucket Cloud is **read** access, which will allow the user to view, clone, and fork the repository code but not push changes. Read access also allows users to create issues, comment on issues, and edit wiki pages.

One alternative would be for you to showcase the repository via a screen share with the user, so you would navigate the repository with your account and would not need to grant the user access. If that is not feasible, then I'm afraid the only option would be to temporarily give the user **read** access.

Thank you, [@michailtam](/t5/user/viewprofilepage/user-id/2198274) !

Patrik S

comments: author: michailtam
body: Thank you [@Patrik S](/t5/user/viewprofilepage/user-id/4668197) for the quick reply. Nevertheless, I have thought about the screen share option but this is not feasible. To grant someone temporary access lets him clone the repository and use the code afterwards. So this is also neither an option. After thinking about any solution a developer could offer the code for a time period and then lock it automatically after the time has passed. I hope that Atlassian will provide an option for such cases which in my opinion is not difficult to provide. For example, Atlassian could provide only a screen reading option and disable cloning or any other options which grants the extern user clone access. Please think about any solution. THX and greetings!!


author: Patrik S
body: Hello [@michailtam](/t5/user/viewprofilepage/user-id/2198274) ,

thank you very much for your feedback. I went ahead and raised a feature request to implement a "View" access level in Bitbucket Cloud :

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

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. Feel free to comment on that feature request with your use-case.

Please note that all features are implemented with [this policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) in mind.

Thank you, [@michailtam](/t5/user/viewprofilepage/user-id/2198274) !

Patrik S


author: michailtam
body: Hi [@Patrik S](/t5/user/viewprofilepage/user-id/4603309) THX for your effort. Greetings!!


Tags: bitbucket-cloud

cloud
Bitbucket database on MSSQL Server 2022
Asked by Yeghishe Hovhannisyan:

Hello

<br />

Did anyone already try to upgrade the sql server hosting the BitBucket database to version 2022?

Any feedback regarding to it or may by recommendations from Atlassian support?

Thank you in advance  
Yeghishe


Answers:
author: Julie Mason
body: Are there plans to support SQL 2022?

We literally were getting ready to cutover our SQL Server that is housing the database this week to SQL 2022, but just put the brakes on.


author: Robert Wen_ReleaseTEAM_
body: Hello [@Yeghishe Hovhannisyan](/t5/user/viewprofilepage/user-id/5258995) ! Welcome to the Atlassian Community!

MSSQL 2022 doesn't appear to be supported on Bitbucket Server/Data Center.

<https://confluence.atlassian.com/bitbucketserver/supported-platforms-776640981.html#Supportedplatforms-databasesDatabases>

comments: author: Yeghishe Hovhannisyan
body: Well , the thing is when application vendors provide info about supported versions, in general it means that they support the corresponding compatibility level , in this case 160, which is not yet supported.  
But if to keep intact the database compatibility level and just upgrade the server version, in that case normally the breakthrough changes which could have impact on the workload, should not apply to that database.  
At least that is how I understand the "compatibility certification" from MS documents.  

So it would be interesting to know if anyone already tried to use MSSQL Server 2022 for BitBucket and if what is the experience ?  

Also would be interesting to know the recommendation of Atlassian support/team if can we normally go to MSSQL 2022 with that scenario ?


author: Christian Glockner
body: Hi Yeghishe,  

Bitbucket Server doesn't support MS SQL 2022, regardless of compatibility level. If you run into issues, Support will not be able to assist in any way until you downgrade to a supported version.  

Cheers,  
Christian  

Premier Support Engineer  
Atlassian


author: Yeghishe Hovhannisyan
body: [@Christian Glockner](/t5/user/viewprofilepage/user-id/527595)

Thank you for reply.  
Do you maybe have information if when is expected, Bitbucket and other Atlassian products would get 2022 support ?


Tags: bitbucket-server

server
Mesh home directory not able to set.
Asked by Shubham Chandole:

Hit team,

I am working on the bitbucket installation on Ubuntu 20.04.

I am facing some issues regarding Mesh configuration.  

### I refer [Mesh configuration](https://confluence.atlassian.com/bitbucketserver/set-up-and-configure-mesh-nodes-1128304356.html) link to set up Mesh. {#toc-hId-2055126231}

I am just confused about the installation directory.

I set the path of the bitbucket installation as **/opt/atlassian/bitbucket/8.9.2**so I downloaded mesh packages and unzip on same location /opt/atlassian/bitbucket/8.9.2/mesh

I also tried to unzip mesh packages on the separate folder path

**/opt/atlassian/bitbucket/atlassian-bitbucket-mesh-2.0.1/bin/**

Please help me on this part where should I copy mesh packages and how to set up bitbucket on-prem

The following blog is from the link where I get confused.

*** ** * ** ***

### Create the Mesh home directory {#toc-hId-247671768}

1. Create your home directory (with full control permission) on the Mesh node -- your Bitbucket Mesh data will be stored here. Note that this should be separate to your installation directory. We'll refer to this directory as your `<home-directory>` in the below steps.
2. Edit `<installation-directory>/bin/set-mesh-home.sh` file -- uncomment the `MESH_HOME` line and add the absolute path to your home directory.


Answers:
author: Christian Glockner
body: Hi Shubham,

Are you trying to set up a standalone Mesh node or are you trying to install a Bitbucket Server node?

Cheers,  
Christian  

Premier Support Engineer  
Atlassian

comments: author: Shubham Chandole
body: Hi Christian,

Thank you for your response.

I am trying to install bitbucket on a single AWS Ec2 machine i.e Stand alone machine.

I am getting confused when I started setting up Bitbucket. Because, If I refer <https://confluence.atlassian.com/bitbucketserver/install-bitbucket-server-on-linux-868976991.html>

this document I get sidecar is not the available issue.

And if I install a lower version of bitbucket (5.9) then, it will work.

Please guide me on this issue.

If it is possible to schedule a call then please let me know.

Thank you

Shubham


Tags: bitbucket-server

server
Unable to fetch fingerprints - non-standard port
Asked by PiX06:

I'm trying to set up pipelines for a new project in the same way that I have set up many other projects in the past, however I'm getting the

"Unable to fetch fingerprints, check host SSH connection and try again"

error.

The target server is running the SSH daemon on a non-standard port so I'm supplying the Host address in the format x.x.x.x:y where y is the port number.  

The firewall on the server is configured to allow SSH connections from any IP address on the non-standard port and I am able to connect without issue from my local machine via \`ssh username@x.x.x.x -py\`   

Not really sure how to further debug this issue


Answers:
author: Theodora Boudale
body: Hi [@PiX06](/t5/user/viewprofilepage/user-id/5258567) and welcome to the community.

Could you please provide the following?

* the workspace id and repo name of the repo where you are trying to add the host address, but masked (don't reveal the full names, just some characters from the workspace id and repo, so I can identify them from the ones you have access to)
* try adding the host address again and let me know the date and time in UTC that you did it

I can then check our logs and see what error we get when you try to add the address.

Kind regards,  
Theodora

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

Thank you for your reply.  

The workspace ID is PiX\*\* and the repo name is studi\*\*\*\*  

I've just tried fetching the host's fingerprint again at 15:00 UTC  

Thanks,  
Alex


author: Theodora Boudale
body: Hi Alex,

Thank you for the info. I can see in our logs a 404 error when we try to fetch the fingerprint.

However, for testing purposes, I tried running the following command from my work computer and it seems to work ok

```
ssh-keyscan -t rsa -p <port> <ip>
```

Additionally, this command works when testing it in a Bitbucket Pipelines build.

Is it possible that you have blocked on your firewall only some of Bitbucket IPs, listed here?

* <https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/>

Does the command above work if you add it to your yml file?

If so, instead of fetching the fingerprint from the repo settings, you could also add the following commands in your yml file, before the commands that connect to your server via SSH:

```
- mkdir -p ~/.ssh
- ssh-keyscan -t rsa -p <port> <IP> >> ~/.ssh/known_hosts
```

I would suggest checking though if any of our IPs are blacklisted on your server.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

ssh
Slack notifications aren't pinging all reviewers
Asked by Filipe Tedim:

Currently the Slack notifications don't seem to be pinging everyone in our frontend team except me (who has set up the whole thing). You can see in this screenshot below it adds the @ before my name "Filipe Tedim", but no one else's, which means they aren't getting pinged for it. Any tips?

![bb.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/266197iC1D3B495D5645107/image-size/large?v=v2&px=999 "bb.PNG")


Answers:
author: Syahrul
body: G'day [@Filipe Tedim](/t5/user/viewprofilepage/user-id/5258319), and Welcome to the community!

There are two reasons why the user was not mentioned in the Slack notification:  
1. The user is not using the same email address in Slack as in the Bitbucket cloud.
2. The user did not enable mentions for the Bitbucket application in Slack.

I suggest following these steps to address the issue:

1. Verify if the user uses the same email address for both Bitbucket and Slack. If not, ask them to update their email address on either platform to ensure they match.

2. If the email addresses match, then proceed to the second issue. Ask the user to enable mentions for the Bitbucket application in the Slack room. They can do this by using the following command in the Slack room:

    /bitbucket mentions on

Let me know if that helps.

Regards,  
Syahrul

comments: author: Filipe Tedim
body: That was indeed the correct case (option 2), thanks!


Tags: bitbucket-cloud

cloud

notification

slack
Trying to push HW assignment via Git cmd/bash. Issue
Asked by Jordan Caswell:

I am trying to push a file from via Git CMD/Bash and I recently had to change my SSH key and create a new one. I deleted my old key and made a new one to replace it. I am currently trying to push something after successfully setting up the new key. I receive a prompt for my password when I am pushing my file and I enter the password correctly and I receive the error, **"remote: Invalid credentials**   
**fatal: Authentication failed for ______."**

I am unsure how to go about this I am just trying to push this file to my repository. Thank you for the assistance in advance.


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

You mentioned SSH keys, however, the message in the output normally shows when HTTPS authentication is used.

If you navigate to the directory of your clone and run the following command:

```
git remote -v
```

does the URL of the repo in the output start with **https://** or with **git@bitbucket.org** ?

If it starts with https://, you will need to change it to an SSH URL in order to use SSH.

You can do that with the command

```
git remote set-url origin git@bitbucket.org:workspace-id/repo.git
```

where

**origin** replace with the name of your remote, if it is different than **origin** . The name of your remote shows in the output of **git remote -v**   
**workspace-id** replace with the id of the workspace this repo belongs to  
**repo** replace with the sluf of your repo

<br />

If you are using OpenSSH as an SSH client, I would also recommend updating the **\~/.ssh/config file** on your machine with the following:

```
Host bitbucket.org
    AddKeysToAgent yes
    IdentityFile ~/.ssh/{ssh-key-name}
```

where **{ssh-key-name}** replace with the name of the private SSH key, whose public key you have added to Bitbcuket.

This will ensure that this specific SSH key will be used every time you clone, pull, or push to a Bitbucket Cloud repo via SSH.

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

Kind regards,  
Theodora

comments: author: Jordan Caswell
body: Hi, I resolved my issue. Uninstall and reinstall solved my issue. Thank you for the response.


author: Theodora Boudale
body: That's good to hear Jordan, thank you for the update. Please feel free to reach out if you ever need anything else.


author: Jordan Caswell
body: ![help.png](https://community.atlassian.com/t5/image/serverpage/image-id/266195i9BB52784C1B2C7DD/image-size/large?v=v2&px=999 "help.png")


Tags: bitbucket-cloud

cloud
I'm unable to push commits to my Bitbucket repo
Asked by Uri Mann:

I have a repository on bitbucket.org. I currently made a small change in my local repo and I'm trying to push it to the remote. I first get a popup ![image.png](/t5/image/serverpage/image-id/266183i3761D3E83ADA3CEA/image-size/large?v=v2&px=999 "image.png")

When I enter my credentials I'm told that the credentials are invalid. They are valid for sure since if I use the exact same password in the browser I'm logged in.

Please advise,

Uri


Answers:
author: Uri Mann
body: It looks like the issue was related to the fact that I added **Access Token** . It prevents all the existing local repositories from pushing or pulling until the following line is changed to **.git/config** file:

```
[remote "origin"]
   url = https://x-token-auth:<token>@bitbucket.org/<user>/<repo>.git

```

Note that the token must have at least read/write to the repository

++It should really be part of the information on the Access Token creation screen++

comments: author: Uri Mann
body: IMHO, this is actually a bug


Tags: bitbucket-cloud

cloud
Connecting Bitbucket with Amplify
Asked by kim-tom:

Have somone ever tried connecting Bitbucket with Amplify?

I followed this tutorial, but failed.

<https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/integrate-a-bitbucket-repository-with-aws-amplify-using-aws-cloudformation.html>

I grant Oauth access to the workplace, but bitbucket returned 400.

Resource handler returned message: "Invalid request provided: There was an issue setting up your repository. Please try again later.({"type": "error", "error": {"message": "You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated."}})

![????????? 2023-07-02 210231.png](/t5/image/serverpage/image-id/266167i64A054C9D9CC5449/image-size/large?v=v2&px=999 "????????? 2023-07-02 210231.png")


Answers:
author: Theodora Boudale
body: Hi [@kim-tom](/t5/user/viewprofilepage/user-id/5257742),

Looking at the guide, I see that an access token needs to be provided for certain operations. Access tokens are valid for 2 hours only. Did you perhaps use an access token that was generated more than 2 hours before the time you used it?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Pipeline runner: How do I use commands like npm?
Asked by Tomer Horowitz:

I am trying to run a bitbucket pipeline runner on my macOS computer in order to build my react native application using fastlane.

Manually I know I have all the deps I need like npm, xcode, etc but when I try to run an npm install or something, I get an error "npm is not a known command", I have also checked the path and the installation directory is not in it.

So my question is how do I use (for example) the npm that is installed on the macos computer my runner runs on in my pipelines.

Thank you.


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

MacOS Runners do not use Docker containers, they use Bash to run pipeline steps on your MacOS machine (host device).

If a certain tool is installed on your MacOS and you can use it in Bash outside the runner, you should be able to use it with the runner as well.

You mentioned that the installation directory of npm is not in the $PATH, so it sounds like this may be the reason why the command cannot be found.

I would suggest the following:

1. add the installation directory in the $PATH
2. restart the terminal (including the one running the runner)
3. ensure you can run npm commands without the runner
4. then start the runner and try to run your build again

Kind regards,  
Theodora


author: Erez Maadani
body: Hi [@Tomer Horowitz](/t5/user/viewprofilepage/user-id/5257855)

Your macOS is a runner which runs bitbucket pipelines which spawn containers for each step.

It sounds like the image the step is using, does not have npm installed or npm is not in its PATH.

To verify it, pull the image locally (to your macOS), run it interactively and try running the command "npm -v".

Hope that helps


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Build dotnetcore step ( push to ECR) took so long
Asked by Thanh Truong:

Hi Team,

<br />

We have a repository using build docker step which took 23 minutes to build successfully. Can your team please check what is cause this issue?

a pipeline had issue is: \<build_url_removed\>

it took 23m 13s for build/push-image to ECR.

Thanks

Thanh


Answers:
author: Theodora Boudale
body: Hi Thanh,

We cannot access your build without a support ticket. Please create a ticket with the support team and provide the link to your build, and the engineer working on your ticket will look into it.

You can create a ticket via <https://support.atlassian.com/contact/#/>, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure to provide the URL of the workspace this repo belongs to.

Just a heads up, I removed the build URL from your post to protect your privacy.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Getting error data stream error (invalid code lengths set) while pushing to repo
Asked by gabriel.duchateau@syzygysoftwarelabs.com:

Hi

I am pushing the last commit to my repo and I am getting the following error. Could somebody guide me on how to fix it?

Thanks so much

Enumerating objects: 10272, done.  
Counting objects: 100% (10272/10272), done.  
Delta compression using up to 12 threads  
Compressing objects: 100% (7208/7208), done.  
remote: error: inflate: data stream error (invalid code lengths set)  
remote: fatal: pack has bad object at offset 561706: inflate returned -3  
error: RPC failed; curl 55 Failed sending data to the peers  
Writing objects: 100% (10261/10261), 842.58 MiB \| 2.49 MiB/s, done.  
Total 10261 (delta 4407), reused 4150 (delta 1750), pack-reused 0  
error: remote unpack failed: index-pack abnormal exit


Answers:
author: Theodora Boudale
body: Hi Gabriel and welcome to the community.

Based on the output of the push command, your local repo may be corrupted.

Could you please run the following command in the directory of your clone and let us know what the output is?

```
git fsck --full
```

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Pipeline failing because an artifact is not being persisted
Asked by QPV:

I have the following failing step:  
\`\`\`  
+ yarn install  
2
yarn install v1.22.19  
3
[1/4] Resolving packages...  
4
error Package "" refers to a non-existing file '"/opt/atlassian/pipelines/agent/build/app/vendor/symfony/ux-turbo/assets"'.  
5
info Visit <https://yarnpkg.com/en/docs/cli/install> for documentation about this command.  
\`\`\`  
It was executed in parallel to a \`composer install\` step that downloads symfony/ux-turbo, among others.  
I changed the pipeline so that these two steps are not parallel, with Composer running first and then Yarn. The Composer step is configured to persist the vendor directory and I can see it listed when doing \`ls -lR\` at the end like the troubleshooting guide says, but the Yarn step still fails with the same error.  
What is happening? Maybe cache is leaking between runs of the pipeline?


Answers:
author: QPV
body: Hi Theodora.

This is the output for Build teardown on the first step:

```
You already have a 'composer' cache so we won't create it again
Searching for files matching artifact pattern vendor/**

Searching for test report files in directories named [test-results, failsafe-reports, test-reports, TestResults, surefire-reports] down to a depth of 4
Finished scanning for test reports. Found 0 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.
```

And the artifacts definition:

```
artifacts:
- vendor/**
```

Thank you.

comments: author: Theodora Boudale
body: Hi [@QPV](/t5/user/viewprofilepage/user-id/5257580),

I think the issue may be with the path in the artifacts definition.

The output you posted in your question mentions the path

```
/opt/atlassian/pipelines/agent/build/app/vendor/symfony/ux-turbo/assets
```

So, the **vendor** directory is inside the **app** directory in the $BITBUCKET_CLONE_DIR.

Can you try the following definition instead?

```
artifacts:
  - app/vendor/**
```

Or, in case you need everything under **app**, you can use the following:

```
artifacts:
  - app/**
```

Kind regards,  
Theodora


author: Theodora Boudale
body: Hi [@QPV](/t5/user/viewprofilepage/user-id/5257580) and welcome to the community!

Parallel steps cannot consume artifacts generated by steps in the same parallel set, so making the steps not parallel was correct.

Regarding the failure after you made this change:

**1.** Can you please open the build log of the step that generates the artifacts, expand the **Build teardown** section, and let us know what you see there?

This section mentions details about artifacts upload, so if there is any error it should be printed there.

**2.** What is the exact artifacts definition in your bitbucket-pipelines.yml file? Are you using a path relative to $BITBUCKET_CLONE_DIR?

An artifact definition accepts only paths relative to the $BITBUCKET_CLONE_DIR (this is the path in the Docker container where the repo gets cloned, /opt/atlassian/pipelines/agent/build/)

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud