youngmon/atlassian-qna huggingface dataset:
Try to add ssh key, but get "Someone has already added that SSH key."
Asked by Basti:

Saw similar posts like this one. E.g. <https://community.atlassian.com/t5/Bitbucket-questions/Someone-has-already-added-that-SSH-key/qaq-p/1983008>

I try to add a new ssh key to

<https://bitbucket.org/pirateinnovation/workspace/settings/ssh-keys>

and get the error

"Someone has already added that SSH key."


Answers:
author: Nic Brough -Adaptavist-
body: There's no easy way to work this out, because the keys that belong to other accounts should not be shared.

If you shared the key with someone, you should know who. If you were given the key by someone, then you'll need to ask them.

If you have no luck chasing it down, you can raise a support request with Atlassian and they can search out the key for you and hence identify the account you shared it with.

If you don't want to spend ages chasing down the share, then you can (and should) create a new key for your account and use that instead.


Tags: bitbucket-cloud

cloud
Tearing down directories in windows self hosted runner
Asked by Manthan-Radia-96:

Hello,

I am running simple default pipeline which is connected to windows runner but getting issue while CLONING step. Directories are created temporary but getting deleted after Build stage complete.

here is my log file output:  
![Screenshot_5.png](https://community.atlassian.com/t5/image/serverpage/image-id/209415iEC6412E734FE98E5/image-size/large?v=v2&px=999 "Screenshot_5.png")

and here is my yml file

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

Please provide a solution to resolve this issue as soon as possible.

Thanks


Answers:
author: Ben
body: Hey Manthan,

The teardown/cleanup process after running a build step in Pipelines Runners is by design, and there is currently no way of preventing this from happening. A build step is considered a separate containerized environment, and therefore much like pipelines itself is cleared after step completion to ensure that it remains this way.

I have raised a feature request with our developers on your behalf - feel free to "Watch" and "Vote" on this to receive updates/improve visibility:  
<https://jira.atlassian.com/browse/BCLOUD-22075>

So that I can add more context to the ticket I've logged above - may you provide your use case for needing this as a feature?

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

bitbucket-runners

cloud

server

windows
after os reinstall vs2019 not connected to bitbucket
Asked by Kiran_Ranchhod:

I have installed os on a new ssd in dual boot configuration, win10 on both. i have source repos installed on separate drive from oses. on new boot drive i cannot connect to bitbucket repos in vs 2019. i have sourcetree installed and can view repos and see changes. in vs 2019 I cannot see repo detail when viewing git -\> manage branches, and cannot view changes in git changes window.

i am still quite new to git and bitbucket, so i may be missing something obvious.

I installed visual studio bitbucket extension but cannot authenticate for some reason.

I tried re-cloning a repo into a different folder. that works and connects to bitbucket, but sadly there are other issues with this approach, and I have some un-commited changes in the repos. I'd like to be able to work on the repos in the folders that I was originally using on the previous os.

Can anyone help me reconnect visual studio to bitbucket again?


Answers:
author: Kiran_Ranchhod
body: After doing more research I've found that this issue is related to the safety features introduced in git 2.35.3. It seems the repos I had been accessing on my other boot drive are not accessible to the new boot drive.

running the command 'git status' on the folder in question gives the response 'git status fatal: unsafe repository (\<my source folder\> is owned by someone else). Since I am the only user of this machine i chose to run the command 'git config --global --add safe.directory '\*''. This command marks all folders as 'safe' so use with caution.

Also I needed to log into the extension with a username, but not my email address, and use the app password that I have been using for my repos. This got me into the BitBucket extension for Visual Studio. I had not been using this extension before so it may not be related to my issue, but after marking everything as safe and logging into the extensions I can now access all the goodness of git and BitBucket on my new os. Hopefully this will help someone in future.


Tags: bitbucket-cloud

cloud
Looking for API endpoint for pull requests that have met merge checks/restrictions
Asked by Cyrus Ghadiri:

I'm having trouble finding a way to see whether or not a pull request has passed all the merge checks, such as "Minimum number of approvals"  

I thought it would be available in the specific pull request endpoint as seen below:   

<https://api.bitbucket.org/2.0/repositories/>\<workspace\>/\<repo\>/pullrequests/\<pull_request_id\>

but it doesn't seem to be the case. I also tried the branch restrictions for a branch as well though I don't believe it returns the right details regarding the rules for the branch.

I've read that previously in 1.0 there was a parameter "canMerge" that showed that it passed all the checks. Anyone have any idea if there is any endpoints that can show this info?


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

I'm afraid that our API does not return this information at the moment.

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

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

The request was closed a few days ago as 'Won't Fix', but I would like to encourage you to add your vote in there (by selecting the **Vote for this issue** link), as the number of votes helps the development team and product managers better understand the demand for new features. If there is more demand for this feature, our development team may reconsider it.

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.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Conditionals in bitbucket pipelines
Asked by Meagan:

We have a pipeline where we really need to do:

```
condition:
  changesets:
    excludePath:
      - "dist"
```

But sadly it doesn't seem like excludePath exists - at least from what I can tell from stack overflow. I couldn't find *anything* on bitbucket pipeline docs about conditions at all. Even with Ctrl+F.

Currently we have something like

```
condition:
  changesets:
    includePaths:
      - "src/**"...
```

but it doesn't add all subfolders under src.

We have a lot of subdirectories, so do I just need

```
src/**/**/**/**/**/**/*
```

or something like that in the include path? Not very nice if we add more subfolders.


Answers:
author: Theodora Boudale
body: Hi [@Meagan Hiatt](/t5/user/viewprofilepage/user-id/4760434),

At the moment, we don't support the option **excludePaths** in the 'condition' section. we have a feature request in our issue tracker about this:

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

I would suggest adding your vote to that feature request (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features.

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.

A condition like the following:

```
condition:
  changesets:
    includePaths:
      - "src/**"
```

should trigger a pipeline when there are changes in files of src and also subdirectories of src.

**1.** Could you please clarify what you mean that "it doesn't add all subfolders under src."?  
Is the pipeline not triggered?

**2.** Is your goal to have the pipeline triggered when there are changes in any files under src, and also files in all subdirectories of src?

**3.** Is this a pipeline that runs on branches? Tags? Pull requests? The default one? Or a custom pipeline?

**4.** What kind of change do you make that doesn't trigger the pipeline (if that is the issue)?  
Do you edit a file in a subdirectory of src? Or Add a new file? Delete a file? Or something else?  
What is the depth of the subdirectory where you make the change?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Is there a way to set the pipeline's name?
Asked by David Gonda:

Hi all,

I'd like to customize the pipelines name that is running:![bitbucket.png](https://community.atlassian.com/t5/image/serverpage/image-id/209243i6683FB947B281F11/image-size/large?v=v2&px=999 "bitbucket.png")Currently of course it only displays the latest commit message. Also I trigger the pipeline run via a curl call, if it's important.

Is this possible?


Answers:
author: Patrik S
body: Hello [@David Gonda](/t5/user/viewprofilepage/user-id/5000324) ,

Welcome to Atlassian Community!

I'm afraid there's not currently an option to change the name of pipeline run, neither from the UI or the API, and the name indeed defaults to the commit message. In this case, I went ahead and raised a feature request to implement that functionality :

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

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. 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, [@David Gonda](/t5/user/viewprofilepage/user-id/5000324) .

Kind regards,

Patrik S

comments: author: David Gonda
body: Thanks for the answer, until this is done I put an echo with the title I wanted to add in the pipeline as a temporary solution.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
How to find out large commit that pushed us over the limit?
Asked by Michael Duxbury:

Hi all,  

Yesterday, I reset the remote to a commit, as those after it caused us to go over the 4gig limit. After resetting (hard) and force pushing, the size went back under the 4gig limit (thanks to the Labs auto garbage collection).  

However, today, we have somehow hit that limit again, I have no idea why. Obviously, someone pushed a large commit but I cannot work out **which** commit it was.  

I have turned on the 'labs' auto garbage collection, but despite going back to the same good commit as I did yesterday (everyone backed up their work locally), it's still not clearing the bloat. Any help would be greatly assisted.  

Please note, we are still very green with regards to GIT, so please bear with me.  

Thank you for any and all assistance.  

Regards,  

<br />

Mike


Answers:
author: Ben
body: Hi Michael,

For Mac OSX/Linux the following command can be executed to retrieve the list of largest files, along with their respective commit hash in the remote repository - this will require that coreutils is installed (see this [article](https://www.howtodojo.com/numfmt-command-not-found/) if you receive an error):

    git rev-list --objects --all \| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \| sed -n 's/^blob //p' \| sort --numeric-sort --key=2 \| tail -n 10 \| cut -c 1-12,41- \| $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest

There is an article here that explains this further: <https://stackoverflow.com/questions/9456550/how-to-find-the-n-largest-files-in-a-git-repository>

If you require a garbage collection to be performed in the backend to decrease the repo size, please let me know and I will raise a formal support ticket with you.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Why I cannot sign into my account?
Asked by Scott Luce:

I can sign into my account but I cannot go to my repository and repeatedly get the following message-  

'The requested repository either does not exist or you do not have access. If you believe this repository exists and you have access, make sure you're authenticated.'  

I am the admin for this account, I did not delete it. I am managing this project, but not a software guy and not very familiar with using these types of accounts. I have also received the following message-  

Importing repository {#toc-hId--549069607}
------------------------------------------

We're getting things warm and cozy for your code.  
**Your import has failed. For more information, check the log below. You can also try your import again.**  
1. 08:51:22 git import for: [https://bitbucket.org/\<workspace\>/\<repository\>](https://bitbucket.org/<workspace>/<repository>)
2. 08:51:22 Cloning [https://bitbucket.org/\<workspace\>/\<repository\>](https://bitbucket.org/<workspace>/<repository>)...
3. 08:51:23 Remote Git clone failed: \<class 'bitbucket.apps.asyncx.tasks.RepoImportTask.ImportException'\>: Command failed. Return value: 128


Answers:
author: Patrik S
body: Hello [@Scott Luce](/t5/user/viewprofilepage/user-id/4999664) ,

Welcome to Atlassian Community!

Checking our internal system, the bitbucket account associated with the e-mail you used to publish this community question indeed does not have access to the repository you shared.

You might have access to that repository in another bitbucket account, that uses a different e-mail. I went ahead and sent a password recovery e-mail to the correct e-mail that has access to the repository you mentioned in your description. Please check all your e-mails inboxes for the password reset e-mail, and use that e-mail to log in to bitbucket. Also, make sure to also look into the Spam/Trash folder, just in case the reset e-mail ended up there.

Let me know in case you have any questions.

\* I've edited your post description to hide private information like workspace and repository name.

Thank you, [@Scott Luce](/t5/user/viewprofilepage/user-id/4999664) .

Kind regards,

Patrik S

comments: author: Scott Luce
body: This seemed to work well enough. Thanks.


Tags: bitbucket-cloud

cloud
I do not receive any e-mail notification from issues, pull requests and the other bitbucket services
Asked by dgiaiotti:

Dear Assistance,

since some weeks I do not receive any e-mail form bitbucket services.

For example I opened an [issue, some days ago,](https://bitbucket.org/UniTS_Phys_Atm/vlongo_4_thesis/issues/1/set-up-the-repository-and-customize-the) and I posted on it and I haven't received any e-mails so far, as I was used to get since the beginning when I started to be a bitbucket user.

From a post [you suggested to read to get helped](https://community.atlassian.com/t5/Bitbucket-questions/Not-receiving-email-notifications/qaq-p/2076970), thanks for this useful service, I guess my e-mail address could be gone in e-mail suppression list.

Please could you check whether this is the case or if there other reasons for the problem.

Many thanks in advance,

Dario


Answers:
author: Ben
body: G'day!

I have checked our internal suppression list and can see that your email address is not present there, additionally, I have checked our SMTP logs and can see that messages are being successfully delivered to your mail server from the Bitbucket Cloud IP range.

May I know if you are still encountering the issue?

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Howto use docker commands inside a step running in a Runner
Asked by Jose A. Illescas (Eulen):

It's possible use docker command inside Runners as currently I do with steps-on-cloud? (I try this: <https://support.atlassian.com/bitbucket-cloud/docs/run-docker-commands-in-bitbucket-pipelines/> but doesn't works inside a runner:

Error: docker command not found

Doesn't work:

options:

docker: true

Doesn't work:

- step:

services:

- docker


Answers:
author: Theodora Boudale
body: Hi [@Jose A. Illescas (Eulen)](/t5/user/viewprofilepage/user-id/4009710),

* Have you perhaps defined a variable named PATH as a repository, workspace or deployment variable? The shell uses PATH to find commands, so if you replace its usual list of locations then commands like docker won't work anymore.  

* What kind of runner are you using? Is it a Linux, Windows, or MacOS runner? And what is the runner's version?

Kind regards,  
Theodora


author: Jose A. Illescas (Eulen)
body: I [try this](https://support.atlassian.com/bitbucket-cloud/docs/configure-your-runner-in-bitbucket-pipelines-yml/#Custom-docker-in-docker-image), see "Custom docker-in-docker image"

But I get same error, "bash: docker: command not found"

definitions:

services:

docker:

image: docker:dind

pipelines:

default:

- step:

runs-on: self.hosted

services:

- docker

script:

- docker-command-here


Tags: bitbucket-cloud

cloud
How to authenticate git request on my computer
Asked by grantnpowell:

I am attempting to pull code, and I am getting denied for authentication by Bitbucket. I have attempted to login using my username/password combo as well as my email/password combo. I have confirmed all my authentication information I am using is correct.

I recall something about authentication tokens, but I have not been able to find anywhere to issue these within the Bitbucket interface. I have looked in the following areas:

Account/Security

Account/Preferences

Repo/Security

Repo/Settings/User and group access

Repo/Settings/Access Keys

THIS IS A FAILURE OF EPIC PROPORTIONS! Why does anyone use Bitbucket? I am looking for alternatives now, but I have an immediate need to get this working today.

I AM PAYING MY EMPLOYEES TO WORK WHO CANNOT GET THEIR WORK DONE BECAUSE OF ATLASSIAN'S FAILURES!


Answers:
author: Robert Wen_ReleaseTEAM_
body: Hello [@grantnpowell](/t5/user/viewprofilepage/user-id/4999376) . Welcome to the Atlassian community!

Depending on your actions and how you connect to the Bitbucket server instance, you may need to set up an SSH key, App password, default password.

This page breaks it down.

<https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/>

From what you say, you may need to set up an app password and then use that app password in place of your Bitbucket password when you perform your **git pull**

Hope this helps


author: grantnpowell
body: Looks like this is what I needed:

<https://support.atlassian.com/bitbucket-cloud/docs/create-an-app-password/>


author: grantnpowell
body: Still waiting, CANNOT WORK!


Tags: authentication

bitbucket-cloud

cloud

git

pull-request
Upgrade to Serverless V3
Asked by Benoit Verreault:

I'm trying to deploy to the new serverless console, which requires serverless v3 npm module. Do you think it would be possoble to realease a new version of the serverless deployment pipeline to upgrade to v3 ?

Also, with serverless v3 you can deploy to serverless console (requires a new ENV variable \`SLS_ORG_TOKEN\`)

<https://www.serverless.com/console/docs/product/create-org>


Answers:
author: Patrik S
body: Hello [@Benoit Verreault](/t5/user/viewprofilepage/user-id/4999334) ,

Welcome to Atlassian Community!

We have already a feature request to upgrade the version of the serverless framework to v3 for the serverless deploy pipe. You can check for the feature request in our public issue tracker by accessing the link below :

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

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. 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, [@Benoit Verreault](/t5/user/viewprofilepage/user-id/4999334) .

Kind regards,

Patrik S


author: Igor Stoyanov
body: [@Benoit Verreault](/t5/user/viewprofilepage/user-id/4999334) hi.  
We released a new version of the [serverless-deploy:1.2.0 pipe](https://bitbucket.org/atlassian/serverless-deploy/src/1.2.0/), which include upgrades to nodejs16.x and serverless framework V3  

Regards, Igor.


Tags: bitbucket-cloud

cloud

lambda

serverless
Issue tracker disabled and issues disappearing
Asked by Greg Black:

We have been using private repositories and private issue trackers for several years without issue. On one of our repos, some issues were recorded in the issue tracker. Some days later the issue tracker was found to be disabled. I re-enabled it but issues previously recorded were no longer there.

To establish the expected behaviour, I did a test. I created a repo and enabled the issue tracker. I created an issue and saved it. In Repository settings, I then selected 'No issue tracker' and saved the setting. The issue tracker was no longer available. I then re-enable the issue tracker and the issue I created earlier was still visible.

There doesn't seem to be any access to inspect or restore from backup. Does anyone have a suggestion or any advice?

Thanks


Answers:
author: Mark C
body: Hi [@Greg Black](/t5/user/viewprofilepage/user-id/818262)

Thank you to reaching out to the community.

For us to investigate the issue further, I went ahead and created a support ticket for this.  
You should be able to receive the email notification with regards to it and let's continue our discussion over there.

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
How to intialize pipeline variables in a schedule pipeline REST call?
Asked by Matija Varjacic:

Hey. I'm trying to create a pipeline schedule (through rest api) with non-default variable values.

I've tried different combinations but nothing is working. It always uses default values. Below is my current rest call.  

curl --request POST -u ''\\  
--url '<https://api.bitbucket.org/2.0/repositories/mmksystems/myrepo/pipelines_config/schedules/>' \\  
--header 'Accept: application/json' \\  
--header 'Content-Type: application/json' \\  
--data '  
{  
"type": "pipeline_schedule",  
"uuid": "{40}",  
"enabled":true,  
"target": {  
"type":"pipeline_ref_target",  
"ref_type":"branch",  
"ref_name":"master",  
"selector": {  
"type":"custom",  
"pattern":"deploy-project"  
}  
},  
"variables": \[  
{  
"key": "VAR_1",  
"value": "a"  
},  
{  
"key": "VAR_2",  
"value": "b"  
},  
{  
"key": "VAR_3",  
"value": "c"  
}  
\],  
"cron_pattern": "0 0 5,9,13 \* \* ?",  
}

EDIT:  
It seems like triggering a pipeline with variables works fine but for some reason you can't create a schedule with custom variables? (<https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#trigger-a-custom-pipeline-with-variables>)  


Answers:
author: Theodora Boudale
body: Hi Matija,

I'm afraid that this is not possible at the moment.

The only workaround would be by creating multiple custom pipelines with the same script but different default values, and then creating a schedule for each one.

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

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

Since you'd be interested in that feature, I would suggest adding your vote to that feature request (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features. 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

comments: author: Matija Varjacic
body: Thanks for letting me know. Wish there was more interest for this functionality. Seems like a trivial change.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

rest-api

schedule