youngmon/atlassian-qna huggingface dataset:
How to delete and re-add a developer
Asked by Michal Mulka:

We have just moved from self hosted mercurial to cloud hosted Bitbucket. We are also users of other Atlassian products, eg JIRA, Confluence.

One of the developers that I added to our private repos has signed up with an incorrect username (their password actually).  

So I removed them from the "Users on plan" (we have more than 5 users, so we purchased the Basic paid plan). However they we able to re-add themselves, but keeping their https login as *password* [@Bitbucket](/t5/user/viewprofilepage/user-id/1253146).org.

As this developer has no commits I need to retain details of, how can I remove them from our private account and re-add them? Do I need the developer to do anything on their own PC for saved cookies.


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: Hello Michal,

if I understand this correctly the user has used their password as their login username?

This could be an issues as an Atlassian ID is created when the user first logs into Bitbucket.

For the user with the password id:

* Delete the Atlassian ID account (or ask Atlassian support to delete it, if it can't be done via self-serve)
* Create a new Atlassian id/account
* Change password!!!

For you:

* Wait for the user to create the correct account
* Invite/add the user to workspace groups, like 'Developers'

Hope that helps.

Cheers Ulrich

// [Izymes](https://marketplace.atlassian.com/vendors/1210584/izymes-pty-ltd) - Bitbucket apps for efficient teams


Tags: bitbucket-cloud

cloud

sourcetree

user
Unable to list all my respositories using Bitbucket clould API
Asked by Sudharsan S:

I am using my Bitbucket APP password to list all my repositories.

However, I am unable to perform through REST API

```
import requests
import json
url = "https://api.bitbucket.org/2.0/repositories/MY-ORG?role=member"

headers = {
  "Accept": "application/json",
  "Authorization": "MY-APP-PASSWORD"
}

response = requests.request(
   "GET",
   url,
   headers=headers
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
```


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

An app password cannot be used by itself for authentication, like an OAuth access token. It needs to be used in combination with your Bitbucket account's username. You can find your username here <https://bitbucket.org/account/settings/> after you log in to your account.

With curl, for example, you can use it as follows:

```
curl -u BitbucketUsername:AppPassword -X GET -H "Content-Type: application/json" https://api.bitbucket.org/2.0/repositories/workspace-id?role=member
```

Or with a basic auth header, where **b64string** is **BitbucketUsername:AppPassword** encoded in base64

```
curl -X GET -H "Authorization: Basic b64string" -H "Content-Type: application/json" https://api.bitbucket.org/2.0/repositories/workspace-id?role=member
```

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Auto-Approving message with Code Owners
Asked by David Scemama:

Hi,

I have a situation where after a commit, a PR is Auto Approved. How is it possible ?  
![Selection_006.png](/t5/image/serverpage/image-id/236608i0242310DD62589CF/image-dimensions/405x245?v=v2 "Selection_006.png")

Thanks

David


Answers:
author: Michael R?egg _Mibex Software_
body: Hi David,

App vendor of Code Owners for Bitbucket here.

The Code Owners app has no auto-approve functionality.

Also, the message shown in the screenshot is not from our app.

In case of any questions, please contact our [support](https://support.mibexsoftware.com).

Best regards,

Michael


Tags: bitbucket-server

server
New account REST API Internal server error
Asked by Jan ??astn?:

I noticed a weird issue in my app - when I have a brand new user and generate App Password, I have troubles sending request against the 2.0 REST API, other than /user which works. For example sending POST request to snippets results in following kind of error (pasted several if that might help investigating).  

curl --url <https://api.bitbucket.org/2.0/snippets> -u "username:app_password" -X POST -H "Content-Type: multipart/form-data" -H "Accept: application/json" -F "title=Super new snippet"

{"type":"error","error":{"message":"Something went wrong","id":"a03db43f7a514b94aa3e557b90f5e880"}}

{"type":"error","error":{"message":"Something went wrong","id":"e26f7c4100954aa9a088463f0d2d4b76"}}

{"type":"error","error":{"message":"Something went wrong","id":"0d12b4492ea4461cb25dfcc6f5aea779"}}


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

Thank you for reporting this to us. I was able to reproduce the error and the Create snippet endpoint indeed fails when the account used for authentication does not have a personal workspace. I've raised a public bug for it :

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

We encourage you to add your vote there and set yourself as a watcher, so you can receive a first-hand update when the bug is fixed.

As a workaround, you can use the workspace-specific endpoint to Create a snippet :

* [POST /2.0/snippets/{workspace}](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-snippets/#api-snippets-workspace-post)

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

Patrik S


author: Jan ??astn?
body: Could this be linked to the fact that no personal workspace was created for the user? I.e. there's not a matching name between user and workspace? Second question would be why that happens, because the info in [Difference between shared and personal workspaces. \| Bitbucket Cloud Cloud KB \| Atlassian Documentation](https://confluence.atlassian.com/bbkb/difference-between-shared-and-personal-workspaces-1141477191.html) indicates otherwise:  

> This type of workspace is created together with the Bitbucket Cloud account and this is the only way to acquire one


Tags: bitbucket-cloud

cloud

oauth

rest-api

user
How to configure cache on self hosted runner
Asked by Micha?:

Doc says  
<https://support.atlassian.com/bitbucket-cloud/docs/set-up-runners-for-macos/>

* Be aware that we don't restrict where your cache folder is located, so you can store the cache in any directory of the device. Be mindful about any technical implications of where your cache is defined and make sure your host machine is recoverable.

1. Where is the cache directory located by default

2. How to specify the cache directory location


Answers:
author: Theodora Boudale
body: Hi [@Micha?](/t5/user/viewprofilepage/user-id/2506068),

Pipelines provide pre-defined cache locations for commonly used language tools which also apply to MacOS Runners. You can view the default locations for these tools here:

* <https://support.atlassian.com/bitbucket-cloud/docs/cache-dependencies/#Pre-defined-caches>

If you are using a different tool or if you want to use a different location, you can check the section "Custom caches for other build tools and directories" in that link for more details.

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

Kind regards,  
Theodora

comments: author: Efren Jamolod
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) ,  
Just to clarify. For the pre-define caches like "gradle", cache dir "\~/.gradle/caches" is in the container that runs the step's scripts, correct? And since self-hosted runners are using "docker-in-docker", I assume the cache dir (ie. "\~/.gradle/caches") is not really mounted by default to the host (ie. MacOS in this case)?  

If my assumption is correct, few follow-up questions:

* Is there away to mount the cache directories to the host of the self-hosted runner?
* I noticed that every step in the pipeline, the caches are being dowloaded. Is there away to avoid this? For self-hosted runners in our own infra, these cache downloads are causing the build timing longer.


author: Theodora Boudale
body: Hi [@Efren Jamolod](/t5/user/viewprofilepage/user-id/5182164)!

Docker containers are used for pipelines builds that run in our own infrastructure and for builds that run in Linux Docker runners. Builds that run in the other type of runners (Linux Shell, MacOS, and Windows Runners) do not use Docker, and the builds run directly in the host machine. MacOS runners use Bash to run pipeline steps on your MacOS machine (host device).

For the last three types of runners I mentioned (Linux Shell, MacOS, and Windows Runners) the cache is saved on the host machine and not in any container, as these runners don't use containers.

The cache will get downloaded for a step that has a **caches** definition in the bitbucket-pipelines.yml file. If a certain step does not need to use cache and you want to prevent the cache from getting downloaded, you will need to remove the **caches** definition from this specific step in your bitbucket-pipelines.yml file.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cache

cloud

server
Yarn install always hangs up in my pipelines
Asked by BradyEdgar94:

I've been trying to set up some pipeline deployments for my node API but no matter what I do the yarn(or yarn install) commands gets to "\[4/4\] Building fresh packages... "and then hangs up. I've waited over 20 minutes to see if it's just being slow but it's never finished.

Is there a cause for this or something I can do to get past this step? This issue doesn't exist on my laptop or server, just pipelines.  

![Screen Shot 2023-01-26 at 10.58.05 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/236508i34878DA5A87F315A/image-size/large?v=v2&px=999 "Screen Shot 2023-01-26 at 10.58.05 AM.png")


Answers:
author: Igor Stoyanov
body: [@BradyEdgar94](/t5/user/viewprofilepage/user-id/5130486) hi. Try this command:  

```
yarn install?--non-interactive
```

But also i suggest you to take a look at our [pipes marketplace.](https://bitbucket.org/product/features/pipelines/integrations) There are some of them to work with the node and maybe they will cover your case.  

Regards, Igor


Tags: bitbucket-cloud

cloud
Trying to delete an empty project
Asked by jade-armstrong:

I've made sure the project in question is empty with no repositories but when I press the delete button and I get a popup asking to confirm deletion and I press delete there as well nothing happens.


Answers:
author: Alex Koxaras _Relational_
body: Hi [@jade-armstrong](/t5/user/viewprofilepage/user-id/50140)

Please take a look at this post here: [https://community.atlassian.com/t5/Bitbucket-questions/Cant-delete-Project-that-has-no-Repositories/qaq-p/1535991#:\~:text=BitBucket%20no%20longer%20supports%20Mercurial,project%20itself%20cannot%20be%20deleted](https://community.atlassian.com/t5/Bitbucket-questions/Cant-delete-Project-that-has-no-Repositories/qaq-p/1535991#:~:text=BitBucket%20no%20longer%20supports%20Mercurial,project%20itself%20cannot%20be%20deleted).

Is it possible that you were once had a mercurial repository? If yes, then this could be your problem.

comments: author: jade-armstrong
body: Thanks so much! I hadn't realized there was a repository hiding in there.


author: Theodora Boudale
body: Hi [@jade-armstrong](/t5/user/viewprofilepage/user-id/50140),

There is still a Mercurial repository in your workspace, as Alex mentioned, which is the reason why the project cannot be deleted.

I can delete this repo for you, so you can then delete the project, but I need your consent first. Please let me know if you would like me to proceed with the repo's deletion.

Kind regards,  
Theodora

comments: author: jade-armstrong
body: Hi there,

Thanks so much for the help, I would really appreciate it if you could go ahead and delete the repository.

All the best,

Jade


author: Theodora Boudale
body: Hi Jade,

Can you try deleting the project now? The Mercurial repo has been removed from your workspace.

Kind regards,  
Theodora


author: jade-armstrong
body: Thanks so much, I managed to delete it now.

All the best,

Jade


author: Theodora Boudale
body: You are very welcome Jade, please feel free to reach out if you ever need anything else!

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
When using Kubectl pipeline for a digitial ocean k8 cluster i am getting a doctl not found error
Asked by Dryden Linden-Bremner:

We are currently in the process of converting our eco system from being run on droplets to a DO hosted kubernetes cluster when doing so we have run into a strange error where despite us installing doctl prior to running it the kubectl pipeline cannot identify doctl  

<br />

The following error is showing up in our pipeline

![Screenshot from 2023-01-25 13-33-25.png](https://community.atlassian.com/t5/image/serverpage/image-id/236497i58F0745F90DB066C/image-size/large?v=v2&px=999 "Screenshot from 2023-01-25 13-33-25.png")

The following code is being used to push the image onto out kubernetes cluster on digital ocean it fails on the pipe step

```
- basedir=$(pwd)
- "echo $basedir"
- cd ~
- wget https://github.com/digitalocean/doctl/releases/download/v1.92.0/doctl-1.92.0-linux-amd64.tar.gz
- tar xf ~/doctl-1.92.0-linux-amd64.tar.gz
- mv ~/doctl /usr/local/bin
- "cd $basedir"
- doctl auth init -t $DOCTLTOKEN
- doctl kubernetes cluster kubeconfig save $DOCTL_CLUSTER
- pipe: atlassian/kubectl-run:3.4.0
  variables:
    KUBE_CONFIG: $KUBE_CONFIG
    KUBECTL_COMMAND: 'apply'
    RESOURCE_PATH: 'freelancer-deployment-bb.yaml'
```

Im wondering if anyone knows how to fix this error or how to better format this pipe to avoid it


Answers:
author: Igor Stoyanov
body: [@Dryden Linden-Bremner](/t5/user/viewprofilepage/user-id/5128027) hi. Currently DigitalOcean is not supported by default because it depends on plugin that not presented in the pipe.

We will investigate how to expand the pipe logic with custom plugins and notify you when this feature becomes available.

Regards, Igor

comments: author: Dryden Linden-Bremner
body: thanks igor


author: Igor Stoyanov
body: [@Dryden Linden-Bremner](/t5/user/viewprofilepage/user-id/5128027) hi. Sorry for the late response. We released a [new version of the pipe 3.5.0](https://bitbucket.org/atlassian/kubectl-run/src/3.5.0/) that allows to use pre-execution scripts to install all needed plugins:  

```
script:  - echo 'script logic' > .my-script.sh  - chmod 005 my-script.sh  - pipe: atlassian/kubectl-run:3.5.0    variables:      KUBE_CONFIG: $KUBE_CONFIG      KUBECTL_COMMAND: 'apply'      RESOURCE_PATH: 'nginx.yml'      PRE_EXECUTION_SCRIPT: '.my-script.sh'
```

Regards, Igor


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

kubernetes
Login without email
Asked by Ignatius Martinez:

I need to access an old Bitbucket account that I have saved in my password manager. I have the username and password which is what I used to login with the password manager. I do not know the email that I used for the account, it could be any of hundreds. I can't find a way to reset the password so I can get an email, it would be resent to my main account and it would allow me to find out which email account is associated to. Obviously this is a different account I created just to ask my question.


Answers:
author: David Bolton
body: I have the same issue - old BitBucket account and only a username. The suggestion to contact support doesn't help because you can only do that with a paid account. I can't upgrade to a paid account, because I can't login. I'm in a catch-22. What happens next?


author: marc -Collabello--Phase Locked-
body: My recommendation is to contact Atlassian support directly.


Tags: bitbucket-cloud

cloud
Should you build and test in parallel steps in the pipeline?
Asked by Drew Gallagher:

If your build and testing steps do not depend on each other, is it best practice to use parallel steps in the bitbucket pipeline to increase efficiency?

<https://support.atlassian.com/bitbucket-cloud/docs/parallel-step-options/>

What are some common patterns for this?


Answers:
author: Theodora Boudale
body: Hi Drew,

It's common to use parallel steps for deploying to multiple similar environments at the same time or for steps that perform tests. However, you could use them for build and testing steps if they don't depend on each other i.e. if your test steps do not need artifacts produced by the build steps. Parallel steps can only use artifacts produced by previous steps, not by steps in the same parallel set. So, if a testing step needs artifacts produced by a build step, then these two steps shouldn't be parallel.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Pipeline not completing
Asked by Gowri sankar R:

Repo: <https://bitbucket.org/leadflare/bilancio/>

Pipeline is not completing for few last builds, We don't find any useful information to debug, can you please let us know if anything you can help us.

Thanks

Gowri


Answers:
author: Patrik S
body: Hello [@Gowri sankar R](/t5/user/viewprofilepage/user-id/3840949) ,

Thank you for reaching out to Atlassian Community!

I've checked internally and see you have opened an internal ticket with us about this issue, as your workspace is on a Standard plan, and also observed the issue was fixed by removing the max-time definition from the step.

Please feel free to reach back out in Community or in an internal support ticket if there is anything else we can assist you with.

<br />

Thank you, [@Gowri sankar R](/t5/user/viewprofilepage/user-id/3840949) !

Patrik S


Tags: bitbucket-cloud

cloud
Post SSO account access
Asked by Avinash Shenoy:

Hello,

My organisation is an existing Bitbucket and Jira customer. We now plan to SSO enable Atlassian access for our employees. I am unsure what happens to a users' pre SSO account and privileges when the same user logs in with SSO credentials.

Will the user still be able to see their old repositories (I think not) ? If not, is there a way to map the pre SSO users' permissions to the new SSO user ?

Thanks.

-Avinash


Answers:
author: Patrik S
body: Hello [@Avinash Shenoy](/t5/user/viewprofilepage/user-id/5129853) ,

Welcome to Atlassian Community!

When you enable the Atlassian Access SSO for your organization's managed accounts, you are just changing the way the users authenticate with the Atlassian Products (Jira, Confluence,Bitbucket, etc).

So when the users try to log in on Atlassian Products, instead of using the username and password, they will be redirected to your Identity Provider to complete the authentication.

All the user's permissions and groups they are part of on Atlassian products will continue the same. Bringing it to Bitbucket, the users will still be able to have access to the same repositories they had before SSO was enabled.

For further details on how to enable SSO for your Atlassian Organization, you can refer to [Configure SAML single sign-on with an identity provider.](https://support.atlassian.com/security-and-access-policies/docs/configure-saml-single-sign-on-with-an-identity-provider/)

Thank you, [@Avinash Shenoy](/t5/user/viewprofilepage/user-id/5129853) !

Patrik S


Tags: bitbucket-cloud

cloud
How do we migrate individual bit bucket accounts to the organziational bit bucket accounts?
Asked by Joby John:

We have the following developers,

Dev1@abc.com

Dev2@abc.com

Both of these accounts are individual subscriptions - Bit Bucket.

Now we are planning to purchase - Enterprise plan which will include all three subscriptions to the following products - Trello, Jira, Confluence, and Bit Bucket.

How do i make sure the individual accounts are migrated to the new plan.

*** ** * ** ***


Answers:
author: Patrik S
body: Hello [@Joby John](/t5/user/viewprofilepage/user-id/5044994) ,

If those developers have repositories within their own personal workspaces ( see [Difference between shared and personal workspaces](https://confluence.atlassian.com/bbkb/difference-between-shared-and-personal-workspaces-1141477191.html) ) they will be able to [Transfer the repositories](https://support.atlassian.com/bitbucket-cloud/docs/transfer-repository-ownership/) to the new shared workspace you create for the company.

However, if you just want those developers to have access to the repositories in the new workspace you create for your company, then you will just need to [Grant those user's email access to the new workspace](https://support.atlassian.com/bitbucket-cloud/docs/grant-access-to-a-workspace/) .

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

Thank you, [@Joby John](/t5/user/viewprofilepage/user-id/5044994) !

Patrik S

comments: author: Joby John
body: thank you.


Tags: bitbucket-cloud

cloud
File > Open Recent shows folder name instead of bookmark / project name
Asked by benomatis:

macOS 10.13.4

SourceTree 2.7.4

When looking at File \> Open Recent it shows the folder name, ie. "public_html", for example, instead of the name of the bookmark / project. Can this be changed to show the bookmark / project name instead?


Answers:
author: Manju
body: File \> Open recent shows me the recently opened repositories. Can you add a screenshot if this is not what you are seeing?

comments: author: benomatis
body: This is probably because the name of the folder you have your repo in is named that way. I, on the other hand, have 2 main folders under every project, one is the "stuff" folder, and the other one hosts the actual project files (or web files) called public_html or other. My suggestion would be for the recents to show the name of the bookmark instead, not the folder name of the project.


author: Manju
body: Could you please file an enhancement request on our [public issue tracker](https://jira.atlassian.com/projects/SRCTREE/) for the product triage to review and consider?

Thanks!


author: benomatis
body: Just opened one: <https://jira.atlassian.com/browse/SRCTREE-5792>

Thank you.
SourceTree won't launch on MaC
Asked by stevensi_isa:

it worked for couple month, until this morning.

it first opened the window and shut down automatically.

I just downloaded the latest version 2.7.4 and it still the same problem.

I tried restart machine.

Here's the error details :

<https://drive.google.com/open?id=1j2wi6E07aYWCCfk7c69vnmQT8wQtZ65Y>

Please help !!!

Thanks


Answers:
author: Manju
body: We have fixed this issue and even rolled out a new build. Please check now and it should work. Also, update to the latest build at the next chance you get. Latest version is 2.7.6.

comments: author: stevensi_isa
body: Thanks, after I restart couple times, it just fixed by itself , not sure why..

I'm still on 2.7.4 now


Tags: mac
Source Tree Confronts me with 10 Password Requests and then Crashes
Asked by Scott Taylor:

This is extremely frustrating, and interrupting to my client's hours. I am simply trying to access a repo through Source Tree and as soon as I try to open Source Tree, it asks me for 5-10 password requests even though I have already typed in the passwords plenty of times and clicked Always Allow, and then soon after the program closes on me.


Answers:
author: Mikael Sandberg
body: Does the pop-up window say Git Credentials for Windows? If so, try and disable it and see if that helps.

To disable it, run:

```
git config --system --unset credential.helper
```

You can also turn off the OpenSSH prompt by running:

```
git config --global --add core.askpass ""?
```


author: Scott Taylor
body: Removing the image cache folder under the \~/Library/Application\\ Support/SourceTree/ does not solve the problem, it still crashes.