youngmon/atlassian-qna huggingface dataset:
SQL files are getting converted to binary files and not readable
Asked by Chandra Sekhar Lattala:

Hi All,

This is to let you know that we are facing challenges to check in the SQL files. Once we check in the .sql files from local repository to remote repository. The files are getting converted to binary files in Bit Bucket and are not in a readable format.

Because of this, we are not able to compare the differences.

Please check and advise. Any help would really appreciated.

Thanks,

Chandra.


Answers:
author: Ankit Patel
body: [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086)   
From Today 24-09-2024 we cannot compare SQl files in VS Code.

Regards  
Ankit

comments: author: Theodora Boudale
body: Hi Ankit,

VS Code is built by Microsoft, it is not an Atlassian product. If you experience issues with VS Code, please reach out to the support team for that product:

* <https://visualstudio.microsoft.com/support/>

Kind regards,  
Theodora


author: Ankit Patel
body: [@Theodora Boudale](/t5/user/viewprofilepage/user-id/3962105)   
I am not talking about Vs code is also not visible in bitbucket in Atlassian view.its showing code in binary format.

![Screenshot 2024-01-24 130846.png](https://community.atlassian.com/t5/image/serverpage/image-id/349153i034C37CE2078551D/image-size/large?v=v2&px=999 "Screenshot 2024-01-24 130846.png")


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

Do you know what encoding was used for these .sql files?

There is a bug with Bitbucket Cloud, UTF-16 and UTF-32 files do not show up in the diff:

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

If that's the case with your .sql files as well, then the diff is not rendering due to this bug.

Please feel free to let me know if you're using a different encoding for these files.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
can't login since 3/1 git http
Asked by HYUNMO KIM:

I used to use git http login. But since the service end,

I changed SSH with basic auth with app key on Sourcetree. Then it said "return Failed to check login for user. Your credentials lack one or more required previlege scopes"

\*other team member still using git over http.

Is this a bug? please provide some solution.

In short,

1. GIT with SSH connection is working

2. Eclipse Git module is working

++2. Source tree SSH, basic Auth, App key login fail++


Answers:
author: Caroline R
body: Hi, [@HYUNMO KIM](/t5/user/viewprofilepage/user-id/4274437), thank you for reaching out to Atlassian Community.

Based on the error message, it looks that this app password doesn't have the permissions required. I tested this on my side and when trying to add a Bitbucket account to SourceTree with Basic Auth, the app password needs to have **Account:Read** permissions, otherwise, it will throw this error you are seeing.

In this case, could you please [create a new app password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/) that will include Account:Read permissions apart from repos and whatever else you have, since the issue seems to be caused by the app password permissions?

Looking forward to hearing from you.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud

sourcetree
backup glue jobs (aws) on bitbucket repository
Asked by Dario Daniele:

Hello everybody!

I am writing you to ask your help regarding an interesting question: my data-system hosted on AWS uses Glue (AWS) Jobs for ETL processes. I want to backup all my jobs (written in python) on a bitbucket repository.

1) It is possible?

2) if so, is it possible to create a system that in an automatic way backup a Glue Job that has been modified on the bitbucket repository?

Thank you very much!


Answers:
author: Piotr Biegun _Gitprotect_io_
body: The only way I can think work this way -\> Code -\> Commit -\> Deploy. You could find an example for Github Actions, so maybe you will be able to do something similar for bitbucket and your CI/CD pipeline. <https://blog.realkinetic.com/continuous-deployment-for-aws-glue-c8abd50d7d58>.   

p.s. If you want to run backups for your repositories you could use the dedicated app from the marketplace: <https://marketplace.atlassian.com/apps/1225728/gitprotect-io-backup-for-bitbucket>


Tags: bitbucket-cloud

cloud

glue
Bitbucket Pipeline configuration to source dotfiles
Asked by Michael Brizic:

Is there a pattern or configuration that would always source in dotfiles from the repository for *any* bitbucket pipeline image/container?

For example, if I have a repository with .bashrc/.bash_profile along with some other shared dotfiles that contain functions useful for multiple different pipelines that all use different Docker container types. I'd like to always source in these files so that every pipeline, and corresponding Docker container has these functions available.

I don't want to create a custom Docker image for every type of container I may use in my pipelines with these files.

I'm looking for something that Bitbucket Pipelines supports out-of-the-box rather than including a script step that does \`source .bashrc\` or \`source dotfiles/.shared_functions\`


Answers:
author: Theodora Boudale
body: Hi Michael,

I'm afraid that there is no configuration to do that at the moment. If creating multiple custom Docker images is not a viable solution, then you will need to source these files by adding a command in the script of each step where these functions are needed.

You are more than welcome to raise a feature request in our issue tracker for that functionality for our product managers to consider:

<https://jira.atlassian.com/secure/Dashboard.jspa>

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Migration to python3.9
Asked by Olha Molodozhenia:

clone:  
depth: 2  
definitions:  
steps:  
- prepare-files-for-deployment: \&prepare-files-for-deployment  
name: Prepare files required for the deployment  
image: python:3.7  
script:  
- apt-get update \&\& apt-get install -y python3-pip  
- pip3 install -r handlers/requirements.txt -t dist  
artifacts:  
- dist/\*\*  
Bitbucket-pipline - is it possible to migrate to python3.9? All I found is about python3.7


Answers:
author: Theodora Boudale
body: Hi [@Olha Molodozhenia](/t5/user/viewprofilepage/user-id/3678296),

I see that you are using the Docker image python:3.7 for the step you posted here.

Checking python's official image in Dockerhub, I can also see that there is an image with the tag 3.9 which uses Python version 3.9.10

You can view all available python Docker images with a tag that includes 3.9 in the link below, and choose the one that is suitable for you:

* [https://hub.docker.com/_/python?tab=tags\&page=1\&name=3.9](https://hub.docker.com/_/python?tab=tags&page=1&name=3.9)

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
one configure bitbucket-pipelines.yml file for use two branches
Asked by Ayush Sharma:

HI

I'm working on the pipeline but I'm only created one bitbucket-pipelines.yml for my master branch and don't add a deployment branch is the pipeline working?


Answers:
author: Theodora Boudale
body: Hi [@Ayush Sharma](/t5/user/viewprofilepage/user-id/4764383) and welcome to the community!

If you have a repo with two branches and you want to run pipelines builds on every push to these two branches, then a bitbucket-pipelines.yml file should exist in both branches.

The bitbucket-pipelines.yml should include either a default definition or a branches definition with the branches' names.

If you have any questions or need further help please feel free to let me know.

Kind regards,  
Theodora

comments: author: Ayush Sharma
body: thankyou [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086)


author: Theodora Boudale
body: You are very welcome [@Ayush Sharma](/t5/user/viewprofilepage/user-id/4764383), please feel free to let us know if you have any other questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Couldnot able to generate API Keys in Jira/Xray.
Asked by Geetha Lakshman:

Trying to integrate Gitlab with Xay jira for our project for CI/CD pipeline. But couldnot bale to gererate API key in Jira instead i have API Token.

In Gitlab Not able to able add trigger.

Kindly suggest with document to integrate Gitlab with Xray Jira.


Answers:
author: Rog?rio Paiva - Xray Xporter
body: Hi [@Geetha Lakshman](/t5/user/viewprofilepage/user-id/4621342)

Please this Xray documentation page for information about the integration of GitLab with Xray:

<https://docs.getxray.app/display/XRAY/Integration+with+GitLab>

Thank you.

Kind regards,  
Rogerio Paiva \[Xray Support Team\]


Tags: bitbucket-server

server

xray
Cant login to bitbucket
Asked by henrik Valerian:

Hi!  

I was invited to a bitbucket repo and asked to register username, passord and email etc.  
Upon completing the process I got redirected to an error page.  

"

We couldn't log you in  
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.

"  

Now login in doesnt work.  

Jira and Confluence works fine, just not Bitbucket.  

What to do?


Answers:
author: Caroline R
body: Hi, [@henrik Valerian](/t5/user/viewprofilepage/user-id/814821), thank you for reaching out to Atlassian Community.

I checked the Bitbucket account linked to the email you used to create this question and confirmed that this Bitbucket account was set as inactive, so I reactivated it. This account was created in 2011, so it means you already had an old Bitbucket account linked to this address.

Could you please try to access it now and let me know how it goes?

Looking forward to hearing from you.

Kind regards,  
Caroline

comments: author: eryksun
body: My Bitbucket account hasn't been used in a long time, so it's probably set as inactive. Would you please reactivate it for me? Thank you.


author: henrik Valerian
body: Hi Caroline!  

Thank you. I had completely forgotten that old account. Everything works fine now. :)  

<br />

All the best,

Henrik


author: Caroline R
body: Hi [@eryksun](/t5/user/viewprofilepage/user-id/4791678), welcome to the community!

I have reactivated your account as well, could you please confirm if you can access it now?

Kind regards,  
Caroline


author: eryksun
body: Thank you, Caroline. It works! :-)


Tags: bitbucket-cloud

cloud
Close source branch does not delete the branch
Asked by Assaf Levy:

Hey guys,

I would like a branch to be deleted automatically from git after its contents have been merged with the main branch, but it's not.

I'm using bitbucket in the cloud, on a repository where I have admin rights. I created a branch, did a commit, opened a pull request which I myself merged, all using the web interface.

At creation of the pull request I tick the "Delete X after the pull request is merged", and at merge I tick "Close branch after commit". The merge goes fine with no errors but the branch remains in git (not in the browser list though).

Any idea what am I missing?

Thanks in advance


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: When you say "remains in git" - do you mean in your local repository on your workstation?

If so - that would be normal, the remote (Bitbucket) will not make any changes on your and other users workstation.

You and others will have to 'clean up' local branches. I found [this article](https://www.erikschierboom.com/2020/02/17/cleaning-up-local-git-branches-deleted-on-a-remote/) very helpful.

Hope that helps,

Best, Ulrich

[Izymes](https://marketplace.atlassian.com/vendors/1210584/izymes-pty-ltd) - We eliminate boring from work!

comments: author: Assaf Levy
body: Hi Ulrich,

I found the problem based on the article you linked. I wasn't aware of pruning and apparently didn't have "auto-pruning" turned on. Now all works great.

Thank you very much!

Assaf


Tags: bitbucket-cloud

cloud
Bitbucket pipelines docker image with multiple FROM?
Asked by Rick Henry:

Hi,

First of all, I'm brand new to Docker! I am currently trying to create my own docker image which I can use in my bitbucket pipelines. What I am trying to do is install node and ruby on the same container. Here is what my current \`Dockerfile\` looks like:  

\`\`\`  
FROM node:12.22.10

FROM ruby:2.7.5

\`\`\`

I've built, tagged and pushed this image and use it in my \`bitbucket-pipelines.yml\` and I'm trying to run this step script:

\`\`\`

script:  
- yarn install  
- gem install bundler -v 2.2.29

\`\`\`

When this is run in the pipeline I get this error:   

\`\`\`  
bash: yarn: command not found  
\`\`\`

I've tried a couple of things, I removed the \`FROM ruby:2.7.5\` and the yarn command worked but obviously the \`gem install bundler...\` did not. So, I know that the Dockerfile and image are working but I don't know how to use both images in my own Dockerfile. Does anyone know what I'm doing wrong?


Answers:
author: Norbert C
body: Hi [@Rick Henry](/t5/user/viewprofilepage/user-id/2862845)

Thank you for contacting Atlassian Support, I'm Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!

I would like to inform you that in case you use multiple FROM in a Dockerfile, you can create a "multi-stage build", which generates two seperate Docker images. You can read further about this on the following site: <https://docs.docker.com/develop/develop-images/multistage-build/>

As a workaround, what I would like to suggest you is to use a similar Docker image in your build like this: <https://hub.docker.com/r/timbru31/ruby-node>

timbru31 has already created a Docker image, which contains both Ruby and Node.

Please let me know if this helps.

Have a great day!

Best Regards,

Norbert  
Atlassian Bitbucket Cloud Support


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

docker
Where is the OAuth Setup in Bitbucket?
Asked by Andrew Liew:

I am planning to setup Jenkins Status Notifier to Bitbucket Cloud that pushes result to the Bitbucket Cloud.

In order to do that I need to setup OAuth consumer in Bitbucket and I can't find OAuth setting. Did I miss the setting somewhere?

Thanks,

Andrew


Answers:
author: Caroline R
body: Hi, Andrew, thank you for reaching out to Atlassian Community.

In order to create an OAuth in Bitbucket Cloud, you can follow the next steps:

* Access the workspace \> Go to **Settings**

* Under **APPS AND FEATURES** , select the option **OAuth consumers**

* There, you will see an option to add a consumer

In case you are not seeing this option, this might be related to the type of workspace you are accessing. If this is a personal workspace, only the owner of this workspace will be able to see the **APPS AND FEATURES**option. We do have a feature request to change this behavior as you can see here:

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

If you want to better understand the types of workspaces we have in Bitbucket cloud, you can access this community article:

* [Bitbucket Cloud account ownership and data access](https://community.atlassian.com/t5/Bitbucket-articles/Bitbucket-Cloud-account-ownership-and-data-access/ba-p/1311340)

And in case you would like to read more about OAuth on Bitbucket Cloud, I suggest the following doc:

* [Use OAuth on Bitbucket Cloud](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/)

I hope this helps, but do let me know if you have any questions.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
SSO and Bitbucket authentication - error pushing code
Asked by Durell Demartini:

Hello,

We are seeking help for one user in our Bitbucket Cloud instance. We don't have a lot of expertise in the area so any help would be appreciated. This particular user's account is provided by our organization, and access is authenticated via SSO. The user's account was just fine for several months. Then since last week, now she is getting an error when pushing code: "Too many invalid password attempts. Log in at <https://id.atlassian.com/> to restore access." When she logs in to Atlassian ID, she is automatically logged in with a completely different account (she is automatically logged in with an user ID that is no longer associated with her account - she was given a different user ID many months ago, and it worked fine until last week). This behavior occurs using an Incognito browser. The user changed her password about a month ago, so that doesn't seem to be the cause (only every 90 days is necessary). We walked the user thru clearing stored credentials in Windows Credential Manager, and but still the user gets the same error when pushing code. Do you have any advice?


Answers:
author: Norbert C
body: Hi Durell,

Thank you for contacting Atlassian Support, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!

Based on my observation your issue is already being helped through a our ticketing portal.

Please let me know if you need any help on this issue or if Alan has already resolved the issue for you?

Have a great day!

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


Tags: bitbucket-cloud

cloud
How to use SSH to connect to a DigitalOcean Droplet ?
Asked by Shalaw Fatah:

I have a GatsbyJS repo on bitbucket and I have a hard time building a pipeline. I think using SSH is a good way to go. But I still don't know how to make the connection. Here is my attempt.

```
- pipe: atlassian/ssh-run:0.4.0

    variables:

        SSH_USER: 'root'

        SERVER: $WEB_HOST

        COMMAND: su - $WEB_USER && cd web-react && git commit -am "changes" && git pull origin master && npm i && npm run half-prod

        PORT: $PORT

        SSH_KEY: $DO_SSH

        ENV_VARS: $PASSWORD

        DEBUG: true
```


Answers:
author: Norbert C
body: Hi [@Shalaw Fatah](/t5/user/viewprofilepage/user-id/4776012)

Thank you for contacting Atlassian Support, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!

Can you let me know what's the error message you receive when you try to connect to the remote server? That would help me troubleshooting the problem you face.

Also as a suggestion, I would like to recommend you to use the Bitbucket Cloud's internal SSH key solution: <https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/>

Once you generated the SSH key in Bitbucket Cloud, please add the configured public key under your server's /root/.ssh/authorized_keys file.

Please let us know how it goes, we're here to help.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

ssh
Restore Backup generated from SCM
Asked by Saurabh Mathur:

We are using Bitbucket Cloud Service. We want to take Backup of all our Repos and Restore them back. Can you please help with following points:

1. We know how to take backup using SCM. But how to restore all the Repo backup to bitbucket in one go, as we have more then 300 Repos?

2. Can you suggest any other good method to take Backup of all Repo and Restore back to Bitbucket?


Answers:
author: Piotr Biegun _Gitprotect_io_
body: Hi [@Saurabh Mathur](/t5/user/viewprofilepage/user-id/1948942),

those two threads should be helpful for you:

* <https://community.atlassian.com/t5/Bitbucket-questions/Is-Bitbucket-Server-in-AWS-AMI-still-available/qaq-p/1950361>
* <https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-Backup/qaq-p/939183>


Tags: bitbucket-cloud

cloud
Pull request conflicts
Asked by Rohit Gayattri:

Hi all i have been using bitbucket and sourcetree and i have been struggling with one thing: Illustration Mybranch name is: abc One of the "Master" branch were i take pull for changes. I took a pull and i've got lot of files in my unstage area and it includes files like php, js, css, images. i have got more than 400+ files which contains changes. please elucidate which action should i do here.


Answers:
author: Bal?zs Szakm?ry
body: Not exactly sure what you did so far, but this is the simplest way to resolve a merge conflict in a pull request in SourceTree:

* (Make sure you have no pending changes and are in your feature branch ('abc' above))
* Fetch
* Merge **origin/**master into your feature branch (you can do this by right-clicking on the branch in the branch list in the remotes section, under your local branch list)
* Resolve conflicts
* Commit
  * Do not change the contents of the stage in the commit dialog or otherwise.
* Push
Configure Git file rename detection/threshold
Asked by Michael Hogg:

Is it possible to change SourceTree's configuration for file rename detection/threshold?

It believes a particular file in my Git repo was renamed in a particular commit:

rename_detected.png

How can I tell SourceTree to not detect file renames, but display the change as a delete+add instead?

rename_not_detected.png

**`git diff`** has **`--no-renames`** and **`--find-renames`** options for configuring file rename detection. Does SourceTree have any similar options?  
[](https://community.atlassian.com/t5/Sourcetree-questions/Configure-Git-file-rename-detection-threshold/qaq-p/457361?attachment-id=7661){#link_116a2890105d97}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/14006/1/rename_not_detected.png){#display_116a2890105d97_0}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Configure-Git-file-rename-detection-threshold/qaq-p/457361?attachment-id=7662){#link_116a2890105d97_0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/14006/2/rename_detected.png){#display_116a2890105d97_2}


Answers:
author: Bal?zs Szakm?ry
body: There is an option to toggle rename detection in the file log window (right-click a file name and choose "log selected"), but there is not way to change the behaviour in the main window.


Tags: git

rename
Step by step for using SourceTree with Kiln
Asked by rshillington:

Having installed SourceTree 2.0.5.2 (2.0.5.2) my understanding was that I would be able to connect to a Kiln remote repository. Switching to Remote tab, and pressing the "Connect a remote account" button, I see only 3 options, BitBucket, GitHub and Stash. What am I missing?


Answers:
author: Seth
body: Simply type the URL to your repository into the Source Path/URL box. The 3 options you see listed are for trying to set up a repo with "Advanced Integration", which offers a few features outside of straight git/hg support.