youngmon/atlassian-qna huggingface dataset:
Could not add new user to repo
Asked by ikevin8me0:

I've been trying since yesterday to add a new user to my repository and it did not go through. The error is "Issue adding new user" "The following user could not be added by email: ...". Try again.

I also tried using my alternative email address (both Gmail and non-Gmail), and it didn't work.

Can someone help or how can I get help?


Answers:
author: Keenan Erwin
body: Yep having the same issue.


author: Dominik Gro?
body: same issue here. please fix this asap


author: Theodora Boudale
body: Hi everyone,

There is currently a bug that prevents sending invitations to someone who does not have a Bitbucket Cloud account yet:

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

The ++**workaround**++ is to:

1. Ask the user to create a new Bitbucket Cloud account

2. After the user creates a Bitbucket Cloud account, invite the user

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Launch runners in background or run with -itd
Asked by Kris Lape:

When creating a runner, the command given by bitbucket runs it interactively. I ran with -itd and as well tried putting job in background (\&). My runners say they are online but the pipelines just hang with no response (or they are running but the message isn't getting back to Bitibucket.


Answers:
author: Theodora Boudale
body: Hi Kris,

I assume that you are using a Linux Docker Runner?

I cannot reproduce what you are describing when starting the runner with -itd

What version of the runner are you using? If it is not the latest one, could you please update it and try again? You can update it by running

```
docker container rm -f runner-76b247e7-b925-5e7b-9da2-1cda14c4ff2c
docker image pull docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:1
```

where **76b247e7-b925-5e7b-9da2-1cda14c4ff2c** replace with the UUID of your runner. Then, start the runner again with -itd

If you are still experiencing issues:

**1.** Can you check the log file of the runner for any errors?

The log file is located at **/tmp/76b247e7-b925-5e7b-9da2-1cda14c4ff2c/runner.log** (where **76b247e7-b925-5e7b-9da2-1cda14c4ff2c** replace with the UUID of your runner).

Look for entries at the time you start the runner, and also at the time that a build is triggered. You can post them here (after sanitizing any private/sensitive data).

**2.** What Linux distribution are you using on the machine where the runners runs?

**3.** Are the minimum requirements for the runner met?
> * A 64-Bit Linux instance with at least 8GB of RAM as a host for the runner.
>   * More RAM may be required for builds with 2x-Steps or build services.
> * Docker v19.03 and above

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-runners

cloud
Size of repository doesn't reduce after switching to LFS
Asked by Boris Kulagin:

We've encountered an issue where our repository size hasn't decreased after switching to LFS. Our source repository contains several large files such as pictures and archives that we're trying to move to LFS storage. To do this, we've implemented a migration plan with the following steps:

1. Install git lfs
2. Clone the repository using 'git clone \<repo url\>'  
   next  
   "Allow LFS" option was set to ON in repo settings on Bitbucket server
3. Navigate to the cloned repository using 'cd \<repo\>'
4. Run 'git lfs migrate import --include="\*.bin" --everything'
5. Run 'git reflog expire --expire-unreachable=now --all'
6. Run 'git gc --prune=now'
7. Finally, force-push the changes using 'git push --force'

After completing these steps, the .bin files were successfully moved to the LFS storage, but when checking the repository size, it appeared that nothing had changed in addition to the LFS moved files. We've waited for server-side GC for a couple of days, but there hasn't been any change in the repository size. The 'git lfs ls-files' command now shows links instead of specific files. We're currently seeking assistance from the community support forum on how to resolve this issue.

Bitbucket DC server version 7.6.20  

<br />

<br />


Answers:
author: Baskar Annamalai
body: Hi [@Boris Kulagin](/t5/user/viewprofilepage/user-id/4817133)

Was the repository enabled with LFS in the repository setting as well? Did you go through the following documentation - <https://confluence.atlassian.com/bitbucketserver/git-large-file-storage-794364846.html>

Best regards,  
Baskar Annamalai  
ServiceRocket

comments: author: Boris Kulagin
body: Hello  

Definitely yes.  

**"Allow LFS"** option was enabled in repository settings after cloning.  
Original post has been updated.  


Tags: bitbucket-server

server
There is no longer an 'SSH Keys' menu item in my workspace
Asked by mikefolsom:

I have always added SSH keys by going to Settings \> Workspace Settings \> SSH keys (under "Security" in the sidebar). But now this menu item is missing from my workspace. If I visit a different workspace it is there. What happened?


Answers:
author: Theodora Boudale
body: Hi [@mikefolsom](/t5/user/viewprofilepage/user-id/1835826),

A user's personal workspace (the one created automatically by Bitbucket Cloud, that has by default the same id as the user's username) does not have an option to add SSH keys. This option is available only to workspaces created manually by a user.

Kind regards,  
Theodora

comments: author: mikefolsom
body: Thanks for the clarification. I am 99% sure I have added ssh keys to my personal workspace in the past because I have dozens of projects currently deploying from there and I had to add keys for those. Should I move all of those repositories to another workspace? How do I manage keys for those existing repositories?


author: Theodora Boudale
body: Hi Mike,

Did you perhaps add the keys to the **SSH keys** page of your account instead? (found here: <https://bitbucket.org/account/settings/ssh-keys/> after you log in)

The SSH keys added to this page provide access to all the repositories your account has access to (regardless of workspace). If you require read-write access to the repos, this will also work.

In case you need read-only (and not write) access to repos, you could also use **Access keys** . You can add them either on the repository level (from **Repository settings** \> **Access keys** ) or on the project level (from the menu **Projects** \> select a project \> **Projects settings** \> **Access keys**). The keys added to a specific project will provide read-only access to the repos of that specific project.

Do any of these options work for you?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
bitbucket rest api get PRs of particular branch
Asked by Abbas Mohammed:

Trying to fetch all the PRs merged to develop branch using bitbucket api. But it is fetching all the PR of other branches also.

Want to fetch PRs of particular branch say "develop" or "release"

<https://api.bitbucket.org/2.0/repositories/>\<workspace-id\>/\<repo\>/pullrequests/?at=develop

Tried with

<https://api.bitbucket.org/2.0/repositories/workspace-id/repo/pullrequests/>?  
destination.branch.name=develop  
Both ways it is fetching PRs of other branches too.


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

You can try with a query as follows:

```
https://api.bitbucket.org/2.0/repositories/workspace-id/repo/pullrequests?q=(destination.branch.name="develop")
```

Certain characters in the query may need URL encoding, and with URL encoding it will look as follows:

```
https://api.bitbucket.org/2.0/repositories/workspace-id/repo/pullrequests?q=%28destination.branch.name%3D%22develop%22%29
```

Does this work for you?

Just a heads up, I removed the workspace id and repo name from your post to protect your privacy.

Kind regards,  
Theodora

comments: author: Abbas Mohammed
body: Thanks [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) it is working as expected.


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


Tags: bitbucket-cloud

cloud
Are BitBucket pipeline cache keys functional in self-hosts runners?
Asked by tony.coop:

The [announcement](https://bitbucket.org/blog/announcing-smarter-caches-bitbucket-pipelines) that introduced cache keys back in February 2003 mentioned that support for this with self-hosted runners was yet to be included but being actively worked on.

The documentation on caching doesn't mention whether this is supported with self-hosted runners yet or not.

Can anyone please confirm whether this functionality is pending still or has it been added since Feb?

Thanks

Tony


Answers:
author: Theodora Boudale
body: Hi Tony,

The cache keys functionality is not available in runners yet.

Kind regards,  
Theodora

comments: author: tony.coop
body: Thanks for the swift response Theodora. Is there any kind of eta on this? Even if it's only a rough estimate?


author: Theodora Boudale
body: Hi Tony,

A rough estimate is some time in the next two months.

Kind regards,  
Theodora


author: Mike Villis
body: [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) Any news on the availability of this one?


author: Theodora Boudale
body: Hi Michael,

I don't have an update to share. We have a ticket about this in our issue tracker:

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

You can vote for it and add yourself as a watcher if you'd like to get notified via email on updates.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cache

cloud
Someone has already added that key as an access key to a repository.
Asked by Lucian Z_:

trying to add my ssh pub key to bitbucket account but is seems that was already added  
Someone has already added that key as an access key to a repository.


Answers:
author: Patrik S
body: Hello [@Lucian Z_](/t5/user/viewprofilepage/user-id/2011197) ,

Thank you for reaching out to Atlassian Community!

The error message you are receiving indicates that the key you are trying to add is already currently added as an access key in one or more repositories. A key can't be added at the same time as an Access key and Account key (the ssh key you configure in your Personal Settings), so this is the reason why you are receiving the error.

You can find the access keys of a repository by navigating to the repository and going to **Repository Settings \> Access keys**. You can go through the repositories of your workspace to find out which repositories have the key and remove it. In case you are still not able to find out where the keys are located, please let me know so I can create a support ticket for you, where you can share your public key so we can locate where its currently added.

Thank you, [@Lucian Z_](/t5/user/viewprofilepage/user-id/2011197) !

Patrik S

comments: author: Lucian Z.
body: thanks Patrik

that was the issue


author: Baskar Annamalai
body: Hi [@Lucian Z_](/t5/user/viewprofilepage/user-id/2011197) ,

I would recommend setting up 2FA along with SSH key to avoid third-party adding keys. FIrst remove the key in the Bitbucket Cloud and go with steps recommend in <https://support.atlassian.com/bitbucket-cloud/docs/configure-ssh-and-two-step-verification/>

Best regards,  
Baskar Annamalai  
ServiceRocket


Tags: bitbucket-cloud

cloud
Unable to commit bitbucket-pipelines.yml
Asked by nando_kun:

Hi everyone,   
I'm trying to write my first pipeline.  

The .yml is quite simple. The only purpose is to run tests, without any deploy.  

pipelines:  
default:  
- step:  
name: .NET Core build \& test  
image: mcr.microsoft.com/dotnet/sdk:7.0  
caches:  
- dotnetcore  
script:  
- cd src/Web  
- dotnet restore  
- dotnet build  
- dotnet test  

The loading icon has been spinning for about half an hour. No indication of the problem.  

Can someone help me? Thanks in advance.  

<br />

<br />

![Immagine 2023-04-27 101654.png](https://community.atlassian.com/t5/image/serverpage/image-id/254188iDF0BA4523E797DBE/image-size/large?v=v2&px=999 "Immagine 2023-04-27 101654.png")  


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

Do you have admin access to this repo? If so, could you please do the following (if you don't, you can ask an admin to do this):

1. Open this repository on Bitbucket Cloud website
2. Go to its **Repository settings** from the left sidebar
3. Select **Links** from the new left sidebar

Is the option **Require issue keys in commit messages** enabled on this page?

There is a [bug](https://jira.atlassian.com/browse/BCLOUD-21425) that doesn't allow users to commit the .yml file from that page when an issue key is required, so you may be affected by this bug if this option is enabled.

To work around this issue, you can create the bitbucket-pipelines.yml file locally, commit it with a valid issue key, and then push it to the repo.

Kind regards,  
Theodora


author: Erez Maadani
body: Hi [@nando_kun](/t5/user/viewprofilepage/user-id/5205977)

This might help: <https://bitbucket-pipelines.atlassian.io/validator>


Tags: .net

bitbucket-cloud

bitbucket-pipelines

cloud
How can I increase pipeline excution time more then 2 hours
Asked by pavan kumar kilaparthi:

Hi Team,  
I am using a self-host Windows machine as a runner. And I am running a Unity build and I got a time-out error. So I want to increase pipeline execution time because of our unity builds will take more than 2 hours.  

Can you please look into I got stuck in the production setup due to this error?  

Thank you.  

<br />

<br />


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

Similar to Cloud, there is a maximum build time of 120 minutes per step with Runners as well. I'm afraid that it is not possible to increase this at the moment.

Please keep in mind that the limit is per step (and not for the whole build). If you have several commands running in a single step that takes more than 120 minutes, you could try putting them in separate steps instead of a single one.

We have a feature request to increase the maximum build time per step for self-hosted runners:

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

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


Tags: bitbucket-cloud

cloud
Automatically add files on repository creation
Asked by Mike P:

Hello,

I am looking for suggestions on how to automatically add two files (security.md and readme.md) when a repository is created. I do have access to scriptrunner. Is there a way to do this when the create repository button is clicked? I was wondering if this could be done via a hook or scriptrunner custom listener or adding a template to git init? If you have any examples of doing such a thing, that would really help.

thanks.


Answers:
author: Ram Kumar Aravindakshan _Adaptavist_
body: Hi [@Mike P](/t5/user/viewprofilepage/user-id/645797)

After reviewing your description, I suggest reading through the solution provided in the [ScriptRunner Documentation](https://docs.adaptavist.com/sr4bib/latest/features/listeners/built-in-listeners/add-default-files-to-new-repositories).

I hope this helps to solve your question. :-)

Thank you and Kind regards,

Ram


Tags: bitbucket-server

data-center

scriptrunner

server
How to revoke client_secret for oAuth API calls?
Asked by Vladimir:

Hello, I have the following situation:  

I want to edit or delete or revoke the "xyz" for the following command:

curl -X POST -u "xyz" <https://bitbucket.org/site/oauth2/access_token> -d grant_type=client_credentials  

how can I do this? What I have tried so far:  

* Under <https://bitbucket.org/{workspace_id}/workspace/settings/api> I see no consumers
* Under <https://id.atlassian.com/manage-profile/security/api-tokens> I see no API tokens


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

If you want to delete an OAuth consumer in Bitbucket Cloud, you need to know which workspace this consumer belongs to and also have admin access to this workspace.

If you don't remember which workspace this OAuth consumer belongs to, then after you log in to <https://bitbucket.org/>, I would suggest opening this page

* <https://bitbucket.org/account/workspaces/>

This page will show you all workspaces your Bitbucket Cloud account has access. You can then open each workspace and go to its **Workspace settings** \> **OAuth consumers** and see if you can find the consumer with this specific Key and Secret.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Not recieving invitation email.
Asked by Akash Pramod Kumar:

I am not recieving any invitations to a repository on bitbucket. I think my email might be on a bounce list?


Answers:
author: Patrik S
body: Hello [@Akash Pramod Kumar](/t5/user/viewprofilepage/user-id/5205363) ,

Welcome to Atlassian Community!

I've checked for the email that you used to post these questions, and your email is not in any of Atlassian suppression lists, so the invitation should be sent as usual.

In this case, could you please ask the workspace admin to try to cancel the invitation and send it again after a few minutes? Also, make sure to check the Junk/Spam folder of your email as sometimes the Atlassian emails might be filtered out into these sections. You can search for email where the sender was **noreply@am.atlassian.com.**

Thank you, [@Akash Pramod Kumar](/t5/user/viewprofilepage/user-id/5205363) !

Patrik S


Tags: bitbucket-cloud

cloud
Disable notification at workspace level
Asked by Amelia Davies:

Hi community,

I'd like to disable notification for a specific workspace. I know that currently each user can do that at individual level. As workspace admin, I'd like to perform this setting for all users.

How can I achive that?

Thanks


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Amelia Davies](/t5/user/viewprofilepage/user-id/4729378) ,

unfortunately, from my knowledge, it is not a builtin feature. There is an open request for that <https://jira.atlassian.com/browse/BCLOUD-22589>

Hope this helps,

Fabio

comments: author: Amelia Davies
body: thank you for the quick answer. I just retrieve that information in the following thread <https://community.atlassian.com/t5/Bitbucket-questions/How-can-I-disable-notifications-for-my-Workspace/qaq-p/2311893>


author: Rebeca Jabonero
body: I'm receiving notifications about any work that my mates do in the articles. How can I deactivate this notifications.

I have all the options disabled but still, when I change something, my colleagues get a notification. Is there any other way to make this not happen?

Thanks in advance,

Rebeca


Tags: bitbucket-cloud

cloud
How to create a webhook that triggers on Merge button
Asked by Hernando Gallego:

I am trying to create a why so my jenkins Pipeline gets triggered when the user hits the MERGE button on bitbucket.

Is there a way to achieve that? Seems like a Webhook might need to be developed but i cannot see proper payloads for that kind of data.

Thanks


Answers:
author: Patrik S
body: Hello [@Hernando Gallego](/t5/user/viewprofilepage/user-id/5205322) ,

Welcome to the Community!

Could you please let us know if your question concerns Bitbucket Cloud or Bitbucket Server?

If it's Bitbucket Cloud, you can create a new webhook by accessing **Repository Settings \> Webhooks \> Add webhook** . While adding the new webhook you will be presented with all the available trigger options, where one of them is **PullRequest:Merge**.

The details of each trigger event and their respective payloads are available in the following documentation :

* <https://support.atlassian.com/bitbucket-cloud/docs/event-payloads/>

Thank you, [@Hernando Gallego](/t5/user/viewprofilepage/user-id/5205322)!

Patrik S


author: jennifer.dempsey_Appfire
body: Hi [@Hernando Gallego](/t5/user/viewprofilepage/user-id/5205322) -

You may want to consider evaluating a tool like [Webhook to Jenkins for Bitbucket](https://marketplace.atlassian.com/apps/1211284/webhook-to-jenkins-for-bitbucket?tab=overview&hosting=datacenter) to help you achieve your goal. It will enable you to trigger a build in Jenkins when a Pull Request is merged.

You can reach out to our awesome [support](https://appfire.atlassian.net/servicedesk/customer/portal/11)team to ask any questions you might have.

You can also email me at [Jennifer.dempsey@appfire.com](mailto:Jennifer.dempsey@appfire.com) and I can put in contact with our PM to further discuss your needs and schedule a demo. We'd be happy to help you any time.

Warmly,

Jennifer Dempsey, Product Marketing Manager, Appfire


Tags: bitbucket-cloud

cloud

webhook
What is this flag meaning?
Asked by ??:

![2019_01_04_10-59-54.png](/t5/image/serverpage/image-id/41589i3B3110696BCC3668/image-size/large?v=v2&px=999 "2019_01_04_10-59-54.png")

What is the '1' meaning?


Answers:
author: Mike Corsaro
body: Hello! That (1) just means there's 1 file with changes in that repository.
Sourcetree not showing latest commits
Asked by ajgonsalves:

I cloned a repository to a network drive. I then wanted to use sourcetree from a different computer so I added that folder to sourcetree on the new computer (new tab then add folder). It appeared to be successful, but it wont show any new commits. Do I have to delete the network shared drive and start again? If I click on remote it indeed takes me to the correct repo on the web and I can see the latest commits. Is there any way to make sourcetree see those commits?


Answers:
author: Mike Corsaro
body: Hello! I'd recommend not using a network drive with Sourcetree as other users have seen problems with it in the past. However, if you cannot see commits it's possible that you'll need to run "Fetch" to get the latest remote changes.

comments: author: ajgonsalves
body: Appreciate you taking the time to answer. My conclusion is Sourcetree and network drives are not a good combination.
Password to Bitbucket seems to fail and then locks access repeatedly
Asked by CJ Bourn:

I am using SourceTree v3.0.15 and Bitbucket Server 5.15.0. My password seems correct and SourceTree works for a time. Then I execute an operation with the remote and I get an 'authentication failed' error and my account is locked. In BB, my account is still logged in and functioning. I log out, log back in, see that it is locked and re-enter the password with the CAPTCHA and clear the lock. Back in SourceTree, I clear all the passwords from Tools \> Options \> Authentication and also clear any cached credentials in Windows Credential Manager. Re-attempt the operation and the Git Credential Manager pops up, I enter the password again and the operation is fine. Some time later, this whole cycle will repeat. What is killing my password and locking my account?


Answers:
author: Pratik
body: Hi [@CJ Bourn](/t5/user/viewprofilepage/user-id/522988) ,

Were you able to find root cause of the issue? One of my colleague is also facing this same issue.

Regards,

Rakesh


author: CJ Bourn
body: And we are using LDAP on our BB Server against the Active Directory of our domain.