youngmon/atlassian-qna huggingface dataset:
bitbucket lfs
Asked by Saber Hosseini:

Hello,

I am trying to migrate a SVN repo to bitbucket. Our repo on the svn has some big .img files. However, when I try to push lfs files I am getting "500 Internal server error".

Regards,


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

We identified a bug that was causing issues with pushing LFS files to Bitbucket Cloud repositories. A fix for this issue was deployed to production a few hours ago. It's good to hear that it works again now! Please feel free to reach out if you encounter any further issues.

Kind regards,  
Theodora

comments: author: Saber Hosseini
body: Thanks Theodora for the reply :).


author: Robert Wen_ReleaseTEAM_
body: Hello [@Saber Hosseini](/t5/user/viewprofilepage/user-id/5333602) ! Welcome to the Atlassian Community!

Are you trying to push SVN into Bitbucket or did you perform a SVN to git migration first?

Here are instructions on using git lfs with Bitbucket.

<https://support.atlassian.com/bitbucket-cloud/docs/manage-large-files-with-git-large-file-storage-lfs/>

comments: author: Saber Hosseini
body: Hello Robert,

Thanks for the answer, I have no idea but it works now magically. I was struggling with it for more than a week now. I went through all different documentation and now it works.

Thanks again :)


Tags: bitbucket-cloud

cloud
I am trying to add files to newly created repository and getting an error permission denied(public k
Asked by Santosh sai Malisetti:

I am trying to add files to newly created repository and getting an error permission denied(public key) how to resolve this issue?


Answers:
author: Syahrul
body: G'day [@Santosh sai Malisetti](/t5/user/viewprofilepage/user-id/5333507)

Welcome to the community!

We have an existing KB that I highly suggest you review and follow the troubleshooting to see if that helps resolve your issue at:

[Troubleshooting Permission denied (publickey)](https://confluence.atlassian.com/bbkb/permission-denied-publickey-302811860.html)

Let me know how it goes.

Regards,  
Syahrul

comments: author: Santosh sai Malisetti
body: Thanks [@Syahrul](/t5/user/viewprofilepage/user-id/744536) ! This is helpful ?.


Tags: bitbucket-cloud

cloud
File/Directory is not readable.
Asked by CDR123:

hi everyone. I've tried a few things, but I am not sure why this deploy pipeline is giving the following error:

```
aws s3 sync /opt/atlassian/pipelines/agent/build/build s3://randomproject1234-media/repos/
warning: Skipping file /opt/atlassian/pipelines/agent/build/build/files.tar.gz. File/Directory is not readable.
```

**My pipeline:**

```
? custom:

? ? items:

? ? ? - step:

? ? ? ? ? name: items

? ? ? ? ? image:

? ? ? ? ? ? name: <account#here>.dkr.ecr.us-east-1.amazonaws.com/<imageimusing>:latest

? ? ? ? ? ? aws:

? ? ? ? ? ? ? access-key: $AWS_ACCESS_KEY_ID

? ? ? ? ? ? ? secret-key: $AWS_SECRET_ACCESS_KEY

? ? ? ? ? script:

? ? ? ? ? ? - yum install -y tar gzip

? ? ? ? ? ? - export PROJECT_NAME=project

? ? ? ? ? ? - export ARCHIVE_NAME=${BITBUCKET_REPO_SLUG}-${BITBUCKET_TAG:-v0.0.0-unknown}.tar.gz

? ? ? ? ? ? - mkdir /tmp/artifacts

? ? ? ? ? ? - mkdir build

? ? ? ? ? ? - cp -R folder /tmp/artifacts

? ? ? ? ? ? - touch /tmp/artifacts/${PROJECT_NAME}-${ARCHIVE_NAME}

? ? ? ? ? ? - tar --exclude=/tmp/artifacts/${PROJECT_NAME}-${ARCHIVE_NAME} -cvzf /tmp/artifacts/${PROJECT_NAME}-${ARCHIVE_NAME} /tmp/artifacts

? ? ? ? ? ? # I know this works great, but I want to understand why the the aws-s3-deploy:1.2.0 isn't working

#- aws s3 cp /tmp/artifacts/*.tar.gz s3://${S3_EXPORT_BUCKET}/repos/

# steps below don't work. for some reason the *.tar.gz in the build folder is not read?

#warning: Skipping file /opt/atlassian/pipelines/agent/build/build/project-myreponame-v0.0.0-unknown.tar.gz. File/Directory is not readable.

? ? ? ? ? ? - mv /tmp/artifacts/*.tar.gz build

? ? ? ? ? ? - ls -la build

? ? ? ? ? artifacts:

? ? ? ? ? ? - build/*

? ? ? - step:

? ? ? ? ? name: Upload to S3

? ? ? ? ? script:

? ? ? ? ? ? - pipe: atlassian/aws-s3-deploy:1.2.0

? ? ? ? ? ? ? variables:

? ? ? ? ? ? ? ? AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID

? ? ? ? ? ? ? ? AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY

? ? ? ? ? ? ? ? AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION

? ? ? ? ? ? ? ? S3_BUCKET: $S3_EXPORT_BUCKET/repos

? ? ? ? ? ? ? ? LOCAL_PATH: ${BITBUCKET_CLONE_DIR}/build

? ? ? ? ? ? ? ? #DEBUG: 'true'

```


Answers:
author: Igor Stoyanov
body: [@CDR123](/t5/user/viewprofilepage/user-id/4566569) hi. Seems like you have problems with your files permissions. Try [this solution](https://stackoverflow.com/questions/63682688/file-directory-is-not-readable-when-copying-content-to-s3-bucket-from-jenkins).

Regards, Igor

comments: author: CDR123
body: [@Igor Stoyanov](/t5/user/viewprofilepage/user-id/4550492) sorry I didn't see your reply earlier. yes I ended up running something like that to fix it. I just forgot to follow up with you all here. thnx for the help.


Tags: bitbucket-cloud

cloud
I'm repository admin, but can't be added as PR reviewer
Asked by StasysC:

I have a problem, when I want to add myself as PR reviewer, but I get error that I'm not a member of this workspace.

Steps what I do:

1. Go to "Pull request" tab and start a ne PR

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

2. I push button "Create pull request" and get this notification:

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

I've noticed, that "Reviewers" list is a bunch of random people, who do not belong in my workspace:

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


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: Hi Stasys,

First up - welcome to the community.

1. you can't add yourself as a reviewer when you author (create) the PR.

2. I don't know why you see these random reviewer suggestions. Is your workspace / repo public? Do you see the same when you make the repository private?

Hope I could help a little.

Best, Ulrich

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

comments: author: StasysC
body: 1. Ah yeas seems legit.

2. Yes, my repo was public... I've changed to private and the list don't show anymore those random people.


Tags: bitbucket-cloud

cloud
How to build frontend and backend docker image usig bitbucket pipeline and deply that images to aws
Asked by venkata kumar:

Hi Team,

How to build frontend and backend docker image usig bitbucket pipeline and push images to ecr, and deploy that images to aws ecs cluster. Please provide proper instructions or pipeline.

Note: don't want to save as artifact like tar or other.


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

You can run Docker commands in a Pipelines build if you include a Docker service in a step's definition:

* <https://support.atlassian.com/bitbucket-cloud/docs/run-docker-commands-in-bitbucket-pipelines/>

For pushing images to ECR and deploying to ECS, you can use the following two pipes:

* [https://bitbucket.org/product/features/pipelines/integrations?search=ecr\&p=atlassian/aws-ecr-push-image](https://bitbucket.org/product/features/pipelines/integrations?search=ecr&p=atlassian/aws-ecr-push-image)
* [https://bitbucket.org/product/features/pipelines/integrations?search=aws%20ecs\&p=atlassian/aws-ecs-deploy](https://bitbucket.org/product/features/pipelines/integrations?search=aws%20ecs&p=atlassian/aws-ecs-deploy)

All the pages I shared include instructions and examples.

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Permanent Access Token
Asked by Yasir Kusay:

Hi, I followed the guide as shown here to generate an access token <https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/>

I see that the access token is temporary. Is it possible to generate one that lasts permanently (or at least control its length)?


Answers:
author: Saxea _Flowie_
body: Hi Yasir,

Have you tried [repository tokens?](https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokens/)

comments: author: Yasir Kusay
body: Thank you for the answer, this was the method I tried before and it did not work. After I ran the command below (replacing, workspace, repositor and repo_access_token)

\`\`\`

```
`curl --request GET \ --url '`https://api.bitbucket.org/2.0/repositories/{workspace}/{repository`}' \ --header 'Authorization: Bearer <repository_access_token>' \ --header 'Accept: application/json'`
```

\`\`\`

I got this error

```
{"type": "error", "error": {"message": "Token is invalid or not supported for this endpoint."}}
```


author: Yasir Kusay
body: Wait I got it! It turns out that with this token, you cannot put it between \`\<\>\` characters.


Tags: bitbucket-cloud

cloud
atlassian/aws-ecs-deploy:1.9.0 does not update ECS task definition/image
Asked by Alexandre Alencar:

Hello,

Using atlassian/aws-ecs-deploy:1.9.0 pipe for updating ECS services and noticed a bug/defect on it.

As part of the parameters passed to it, you can provide both the TASK_DEFINITION and/or the IMAGE_NAME variable, however, the image is not used to update the task definition image anywhere.

Function _update_task_definition(..., image = None)_ declares it, but never uses it and _run(...)_ passes it around line \~230 when _update_task_definition_ is called.

Please fix the pipe to properly update the task definition image with IMAGE_NAME if it is passed.

AWS_SECRET_ACCESS_KEY and AWS_SECRET_ACCESS_KEY are passed empty due to bug <https://jira.atlassian.com/browse/BCLOUD-22913> even tho using OIDC.

YAML

...

pipelines:

\<branch\>:

- step:

name: Update ECS Service

oidc: true

script:

- export IMAGE_NAME=${REGISTRY}/${BITBUCKET_REPO_SLUG}:${  
BITBUCKET_COMMIT}  
- pipe: atlassian/aws-ecs-deploy:1.9.0  
variables:  
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION}  
AWS_SECRET_ACCESS_KEY: ''  
AWS_ACCESS_KEY_ID: ''  
AWS_OIDC_ROLE_ARN: ${AWS_ROLE_ARN}  
CLUSTER_NAME: ${CLUSTER_NAME}  
SERVICE_NAME: ${BITBUCKET_REPO_SLUG}  
IMAGE_NAME: ${IMAGE_NAME}  
TASK_DEFINITION: ${BITBUCKET_REPO_SLUG}-task-def.json  
FORCE_NEW_DEPLOYMENT: 'true'  
...  
Ref

<https://bitbucket.org/atlassian/aws-ecs-deploy/src/master/pipe/main.py>


Answers:
author: Igor Stoyanov
body: [@Alexandre Alencar](/t5/user/viewprofilepage/user-id/2116484) hi. Thanks for your investigation. In current version of the pipe IMAGE_NAME variable is not supported and not presented in the [README](https://bitbucket.org/atlassian/aws-ecs-deploy/src/1.9.0/). You could see it in the code, but it's always None. We will refactor the logic to prevent misunderstandings.

All required settings (i.e image name) you could declare in the task definition file, check this official AWS [example](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/example_task_definitions.html).

Regards, Igor


Tags: aws

bitbucket-cloud

bitbucket-pipelines

cloud
Use of deployment variables within an application
Asked by Richard Alves de Oliveira:

Hello everybody, In my work, the need arose to use variables present in the deployment, within our application. I thought about using the Bitbucket API for this, but I didn't find how. Has anyone ever experienced this ?


Answers:
author: Saxea _Flowie_
body: Hi Richard,

One way to achieve this is to save the variables into a file and include it in the deployment.

comments: author: Richard Alves de Oliveira
body: Can you explain this solution better please?


author: Saxea _Flowie_
body: You can do something like:

```
pipelines:
  default:
    - step:
      name: Save Environment Variables
      script:
        - echo "MY_ENV_VAR=$MY_ENV_VAR" >> .env
        - echo "ANOTHER_ENV_VAR=$ANOTHER_ENV_VAR" >> .env
```

then include .env file in our deployment.


author: Richard Alves de Oliveira
body: It worked very well  
Thanks!!


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

deployment
Really need to allow UI input variables with shared pipeline configurations
Asked by Kristian Luck:

I love the recent new feature as described here: <https://bitbucket.org/blog/share-ci-config>

Unfortunately, I did some experimentation and there is no way to define UI variables in the imported bitbucket-pipeline.yml. And that is a significant requirement for my company. Many of our custom pipelines require the operator to input variable values.

Does anyone else share that need?


Answers:
author: Theodora Boudale
body: Hi Kristian!

We have a feature request for what you're asking in our issue tracker:

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

You can add your vote and feedback there to express your interest.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
ubuntu@3.110.132.86: Permission denied (publickey). ? Execution failed.
Asked by Abhishek Kumar:

I am getting permision denied, after setting all bitbucket-pipeline.

image: atlassian/default-image:2

pipelines:  
default:  
- step:  
name: Connecting to EC2  
script:  
- echo "Deploying to dev..."

# Convert SSH key to base64  
# - SSH_KEY_BASE64=$(echo $SSH_KEY \| base64)

- pipe: atlassian/ssh-run:0.6.1  
variables:  
SSH_USER: "ubuntu"  
SERVER: "IP"

# Use base64 encoded key  
SSH_KEY: $SSH_KEY

COMMAND: "touch file.txt"  
DEBUG: "true"

- echo "Deployed!"


Answers:
author: Syahrul
body: G'day [@Abhishek Kumar](/t5/user/viewprofilepage/user-id/5329792)

Welcome to the community!

The error indicates that the connection to your server doesn't have the right permission.

As a start, I suggest reviewing our documentation on how to configure SSH with the pipeline:

[Using SSH keys in Bitbucket Pipelines](https://support.atlassian.com/bitbucket-cloud/docs/using-ssh-keys-in-bitbucket-pipelines/)

Also, make sure to add your IP host to the Known hosts [Add the public key to a remote host or a Bitbucket repository](https://support.atlassian.com/bitbucket-cloud/docs/set-up-pipelines-ssh-keys-on-linux/#Update-the-known-hosts)

Regards,  
Syahrul

comments: author: Abhishek Kumar
body: Thanks [@Syahrul](/t5/user/viewprofilepage/user-id/744536)

I am happy to know above message and helped me to solved problem..

Regards

Abhishek


Tags: bitbucket-cloud

cloud
I am not getting any verification mails for 2f authentication.
Asked by Sourabh Mishra:

I am getting no emails from bitbucket while i try to do the 2f authentication. I had the 2f authentication earlier but i removed it and somehow i am not getting any verfication email now to reactivate it. Can somebody please help me out with this?


Answers:
author: Ben
body: Hi Sourabh,

I can see that you have not requested 2FA recovery since January this year according to our logs, please refer to our article below to reset your 2FA:

* <https://confluence.atlassian.com/bbkb/how-to-disable-reset-2fa-on-bitbucket-cloud-and-atlassian-account-1236932929.html>

I have also unsuppressed your email account as we received a bounce error from your mail server recently:

```
554 5.7.1 [internal] recipient address was suppressed due to customer policy
```

I would suggest following the article above and having an administrator whitelist our email accounts that are listed there to prevent future email issues in future.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
How to add an alias email which is already used
Asked by Peter Mlakar:

Hello community,  
I want to add an other email to track my work but it says the email is already used by another user.  
Actually, I pushed my commits using the email by force from my local repository. So the repository has commits with the email.  
However the email is another my email for Git so I want to track two emails on BitBucket.  

Thanks for your kindness.


Answers:
author: Ben
body: Hi Peter,

I would suggest taking a look at our article below concerning email aliases - you can update your GIT config so that commits will come from that email alias address in your commit history:

* <https://support.atlassian.com/bitbucket-cloud/docs/configure-your-dvcs-username-for-commits/>

In terms of associating that email alias with your Bitbucket Cloud account itself to map existing commits - if it is already being used by another user account this would not be possible unfortunately. The other account that has the email alias would need to be deleted to free up the email alias for usage.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
How do we migrate from Bitbucket Server to Bitbucket Data Center?
Asked by Mark McGahan:

We (myself -- the tool user -- and our IT expert) would like to meet with a Bitbucket subject matter expert in order to learn how to migrate from Bitbucket Server to Bitbucket Data Center. Please let me know when someone from your organization would be available for this meeting.


Answers:
author: Robert Wen_ReleaseTEAM_
body: Hello [@Mark McGahan](/t5/user/viewprofilepage/user-id/4630600) !

I work for a Solutions Partner and work with clients all the time with questions like these. Let me offer this for free.

The easiest and shortest migration from Bitbucket Server to Bitbucket Data Center is to swap out the server license with the Data Center license.

If you want to look at enhancing the architecture to take advantage of Data Center capabilities, I'd see about talking with a Solutions Partner.

Thanks!


Tags: bitbucket-server

server
is it possible to integrate bitbucket datacenter with jira cloud and jira datacenter?
Asked by Esteban Tello:

currently with our bitbucket datacenter is already integrated to our jira data center, now we want to know if it is possible to add the jira cloud


Answers:
author: Laurie Sciutti
body: Hi [@Esteban Tello](/t5/user/viewprofilepage/user-id/4560460) \~ looks like this is possible: <https://confluence.atlassian.com/bitbucketserver/link-bitbucket-with-jira-776640408.html>


Tags: bitbucket-server

server
In PR, while comment sometimes a comment gets posted multiple times
Asked by Ankur2019:

In PR, specially in low speed network connection

1. Sometimes a single comment gets shown multiple times. Say I comment something, and press \`save\`, it gets commented (same comment) multiple times (mostly two)

2. It happens for suggesting in PR description and code

3. The associated slack notification is posted multiple times

4. Basically a single \`save on comment\`, makes multiple call on \`save\` functionality

This is very annoying. Do someone faced it? Also could anyone please suggest a solution to resolve this issue?


Answers:
author: Theodora Boudale
body: Hi Ankur,

I would suggest that you [generate a HAR](https://confluence.atlassian.com/kb/generating-har-files-and-analyzing-web-requests-720420612.html) file while you reproduce this issue and then create a ticket with the support team and provide the HAR file in the ticket, so we can investigate this issue (please do not post the HAR file here as this is a public forum).

You can create a support 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 you enter the URL of the workspace that is on a paid billing plan to proceed with ticket creation.

Please feel free to let me know if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Can we mask the secret token of a webhook
Asked by Surya Konduru:

When we are creating a webhook, the secret token is readable, can we mask it?

Are there any settings which allow us to do that?


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

I'm afraid that Bitbucket Cloud doesn't provide a way to add a secret token for a webhook. If you include the secret in the URL, it is not possible to mask it.

We have a feature request for the ability to add a secret token:

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

You can add your vote there (by selecting the **Vote for this issue** link). You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
error: Could not find a part of the path '/opt/atlassian/pipelines/agent/build/nupkgs'
Asked by Aysu Saglam:

I have a pipeline which packes code with nuget.config and push nexus repository. I didnt make any changes and it gaves me this error error: Could not find a part of the path '/opt/atlassian/pipelines/agent/build/nupkgs', but it was working fine before. Could anyone have an idea,why this hapening? You could see my pipeline below,thank you.  
image: mcr.microsoft.com/dotnet/core/sdk:3.1  
definitions:  
steps:  
- step: \&nuget-pack-and-deploy  
name: Nuget Pack  
script:  
- export VERSION="4.1.${BITBUCKET_BUILD_NUMBER}" \&\& echo $VERSION  
- dotnet pack code.sln --configuration Release --configfile ./NuGet.Config -o nupkgs -p:PackageVersion=${VERSION} \&\& ls -lR  
- dotnet nuget push /opt/atlassian/pipelines/agent/build/nupkgs/code.${VERSION}.nupkg -k xxxxxxx -s <https://nexusrepo.com/repository/nuget-hosted/>  
pipelines:  
custom:  
custom-deploy:  
- step: \*nuget-pack-and-deploy


Answers:
author: Theodora Boudale
body: Hi Aysu,

Is it the **dotnet nuget push** command that gives you this error? I see that right before this command, there is an **ls -lR**. Does the output of this command show the directory and file you are trying to push?

I would also suggest checking the troubleshooting steps in this guide, section "**Scenario 1: Builds were successful earlier, but started failing recently**":

* <https://confluence.atlassian.com/bbkb/troubleshooting-bitbucket-pipelines-1141505226.html>

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
crucible service permission denied using port 80
Asked by dhandu:

I've tried to change my crucible application port from default 8060 to :80 thru admin =\>server page, but if I restart the crucible servce by admin user (not a root ) after I changed the port i got this error, but root user it works, I am looking for admin user the service should run, Please share with me your ideas..

,564 WARN - failed ProxyPassingSelectChannelConnector@0.0.0.0:80: java.net.SocketException: Permission denied  
,564 WARN - failed ProxyPassingSelectChannelConnector@0.0.0.0:80: java.net.SocketException: Permission denied  
564 WARN - failed Server@433b433b: java.net.SocketException: Permission denied  
564 WARN - failed Server@433b433b: java.net.SocketException: Permission denied  
564 ERROR - Could not start server: Permission denied  
java.net.SocketException: Permission denied

Thx

Dandu


Answers:
author: TimT
body: UNIX-based operating systems by design do not normally allow non-root users to bind to ports less than 1024.

We don't recommend running Crucible or other Java applications as the root user, as Java does not provide a way for applications to change to a less-privileged user after binding to the port (as a normal UNIX daemon would) so the entire application would run with root privileges when started by the root user.

Instead, we recommend that you integrate with Apache or another front-end web server that can bind to port 80 natively, and proxy to Crucible running on port 8080.

There are instructions for this at https://confluence.atlassian.com/display/FISHEYE/Integrating+with+Other+Web+Servers

comments: author: dhandu
body: Thank you for your input.