youngmon/atlassian-qna huggingface dataset:
allow organizational access to personal repo
Asked by david.thornton:

I've like to give everyone in my org, access to a repo in my personal workspace.

How can I do that?


Answers:
author: Patrik S
body: Hello [@david_thornton](/t5/user/viewprofilepage/user-id/4112593) ,

Each workspace user management is separate, so in case you want to give your colleagues access to a given repository in your personal workspace, you will have to either :

* [Create a new group](https://support.atlassian.com/bitbucket-cloud/docs/organize-groups-for-your-repositories/#Create-a-new-user-group) in your personal workspace, manually invite your colleagues to this group, and [grant this group access to the repository](https://support.atlassian.com/bitbucket-cloud/docs/grant-repository-access-to-users-and-groups/#Add-a-repository-to-a-group)
* Manually [grant your colleagues direct access to this repository](https://support.atlassian.com/bitbucket-cloud/docs/grant-repository-access-to-users-and-groups/#Add-user-access-to-a-repository)

Let me know in case you have any further questions.

Thank you, [@david_thornton](/t5/user/viewprofilepage/user-id/4112593) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud
Bitbucket Pipeline replaces word "bitbucket" within url with variable
Asked by hemp0r:

Hey,

in our pipeline defintions we're trying to use a custom terraform module which is hosted in a private bitbucket cloud repository.

Our config looks like the following:

"bitbucket-pipelines.yml"  

```
main:

 - step: *build

 - step:

name: Deploy to Staging

image: hashicorp/terraform:latest

deployment: Staging

script:

 - echo "$BITBUCKET_SA" | base64 -d >> /tmp/gcloud.json

 - export GOOGLE_APPLICATION_CREDENTIALS=/tmp/gcloud.json

 - cd terraform/

 - terraform init -backend-config=./backend/file-for-backend..hcl

 - terraform apply -auto-approve -var-file='./setup.tfvars' -var-file='./backend/file-for-vars.tfvars'
```

"terraform - main.tf"  

```
module "cloud_function" {

source = "git::https://bitbucket.org/<company-workspace>/tfm-gcp.git//cloud_function"

for_each = var.functions

project_id = var.project_id

region = var.region

name = each.value.name

entry_point = each.value.entry_point

trigger_event = each.value.trigger_event

trigger_resource = each.value.trigger_resource

environment_variables = each.value.environment_variables

runtime = var.runtime

source_path = "../functions/"

permissions = ["roles/bigquery.dataEditor"]

}
```

So no magic involed or substitions but while running the pipline we get the following  

    + terraform init -backend-config=./backend/dspl-dev-fs.hcl

    Initializing modules...

    Downloading git::https://$AZR_IMG_USERNAME.org/dmk-group/tfm-gcp.git for cloud_function...

    ?

    ? Error: Failed to download module

$AZR_IMG_USERNAME is the first variable defined in our workspace variables for pipelines but is not used within the repository or project... so it seems like a bug within the pipeline runtime or am I wrong?  
It should just download the defined module, specified in main.tf, but theres an substitution with the word "bitbucket" in URL.


Answers:
author: Patrik S
body: Hello [@hemp0r](/t5/user/viewprofilepage/user-id/4352604) ,

Thank you for reaching out to Atlassian Community!

What I think might be happening here is that your workspace variable **$AZR_IMG_USERNAME** is configured as a secure variable and the value of this variable is most likely ***bitbucket**.* Since [secure variables are masked](https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/#Secured-variable-masking) from the pipeline build logs, if a value matching a secured variable appears in the logs (in this case ***bitbucket*** ), Pipelines will replace it with *$VARIABLE_NAME.*The value your script/terraform will see is the actual value for the variable, but it will not be revealed in the logs.

Even though you are not directly using the variable in this repository, all the workspace variables are made available to the build container, and in the run time if we find any value in the logs matching a secure variable, it will be masked with the variable name.

Hope that helps to clarify your questions! Let me know in case you have any doubt.

Thank you, [@hemp0r](/t5/user/viewprofilepage/user-id/4352604) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Regarding Log4j vulnerability
Asked by Semi Ara:

Hi,

We blocked bitbucket.org access from our office network as per the Log4j IOCs,

our RnD would like to access bitbucket.org for their development purposes, but we would like to make sure Log4j stuff is handled before allowing access to that site.

Can anyone confirm that the Log4j vulnerability is no longer a threat in bitbucket.org?

thanks

Semi


Answers:
author: Alexis Robert
body: Hi [@Semi Ara](/t5/user/viewprofilepage/user-id/4971281) ,

Atlassian Cloud products, and specifically Bitbucket Cloud (accessed from bitbucket.org domain) are not vulnerable as Atlassian already took the necessary measures to mitigate this. You can see the official communication from Atlassian here : <https://confluence.atlassian.com/security/multiple-products-security-advisory-log4j-vulnerable-to-remote-code-execution-cve-2021-44228-1103069934.html>

This means that in you case, the Log4j vulnerability is no longer a threat.

Let me know if this helps,

--Alexis


Tags: bitbucket-cloud

cloud
cannot add SSH key - Someone has already added that SSH key.
Asked by Kornee Kleijwegt:

Hi,  

When I tried updating an ssh key I got this response:

'Someone has already added that SSH key.'

In [this discussion/question](https://community.atlassian.com/t5/Bitbucket-questions/Cannot-add-SSH-Key/qaq-p/1977126) it is suggested to contact you via this portal.

When I type \`ssh -T git@bitbucket.org\` I the following returned:  
"authenticated via ssh key.

You can use git to connect to Bitbucket. Shell access is disabled"

Can you help me?

Kornee


Answers:
author: Patrik S
body: Hello [@Kornee Kleijwegt](/t5/user/viewprofilepage/user-id/4971141) ,

Welcome to Atlassian Community!

In order to further investigate this case, we will you to share your public SSH key, I have created an internal ticket for you using the email of your community account, so you don't have to share this information here.

You should have received an email with a link to the support ticket. Just in case you haven't received it, please feel free to let me know and I can post the ticket URL here. The ticket will be visible only to you and Atlassian staff, no one else can view its contents even if they have the URL.

Thank you, [@Kornee Kleijwegt](/t5/user/viewprofilepage/user-id/4971141) .

Kinds regards,

Patrik S


Tags: bitbucket-cloud

cloud
Pipeline two factor authentication forced and cannot enable pipeline
Asked by Jozsef Samuel:

Hi,

I setup a new workspace.

I cloned a repository from another bitbucket space.

I am now the admin on my workspace and I have a project with that cloned code.

My admin account have two factor authentication enabled.

I want to add a pipeline.

On the pipeline settings, I can see that pipeline isn't enabled.

I cannot enable it because it claims that I need two factor authentication enabled.

It is enabled.

What am I missing?


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

I see that you have created a support ticket for this issue and it has been resolved. I just wanted to leave a reply here for any other users who may come across your question with the same issue:

Bitbucket Cloud uses Atlassian accounts (the ones for <https://id.atlassian.com/>) for authentication, to provide single login to different Atlassian Cloud products.

At the moment, it is possible to set up 2FA both for the Bitbucket Cloud account via <https://bitbucket.org/account/settings/two-step-verification/manage>, and also for the Atlassian account via <https://id.atlassian.com/manage-profile/security>   

In order to enable Pipelines, it is necessary to enable 2FA on the Bitbucket account, instead of the Atlassian account.

Kind regards,  
Theodora

comments: author: Jozsef Samuel
body: Sure,  
This was a real mixup, it turns out that the SSH part was my fault! thanks for the help!


author: Theodora Boudale
body: Hi [@Jozsef Samuel](/t5/user/viewprofilepage/user-id/4971152) ,

You are very welcome, we have a feature request to have unified 2FA in order to avoid such confusion: <https://jira.atlassian.com/browse/BCLOUD-19471>

If you ever need anything else, please feel free to reach out!

Kind regards,  
Theodora


Tags: authentication

bitbucket-cloud

bitbucket-pipelines

cloud
Someone has already added that SSH key. (I have added it to another repo with another gmail acc))
Asked by Andrii Kravets:

When I try to add SSH key to my bitbucket repo I got this error "Someone has already added that SSH key."

This happens because I've already added same SSH key to another bitbucket repo where I logged in with ANOTHER gmail. As I understand my one bitbucket account shouldn't know about another bitbucket account.


Answers:
author: Nic Brough -Adaptavist-
body: That is correct, you should not be sharing keys across accounts.


author: G subramanyam
body: Hi [@Andrii Kravets](/t5/user/viewprofilepage/user-id/4116177) welcome to the Atlassian community.

I see you posted the same question twice and on another group. hence, deleting the other question.


Tags: bitbucket-cloud

cloud
I'm not receiving any mail from Atlassian products.
Asked by Anuj Kumar:

Hello,   
I'm not receiving any mail from any of the Atlassian product like JIRA, confluence and Bitbucket. Hence unable to activate Two-Step verification in my bitbucket account. I would appreciate any help. Thanks


Answers:
author: Awais Butt
body: i a also trying it for my site to receive the mail from atlassian products but i didn't receive for [iesco bill](https://iescobill.com.pk/)


Tags: bitbucket-cloud

cloud
Problems to access a repository
Asked by Alberto gil rodriguez:

I have created my first repository and it seems OK, but when I try to access to the repository, I get the next message:

##### Having trouble showing that directory {#toc-hId--1648589033}

Normally, you'd see the directory here, but something didn't go right.

Try again

I have seen old messages similar to this one in internet, but now, I don't know how to solve.

My repository is in:

<https://albertogilrod@bitbucket.org/albertogilrod/tfgagil.git>

Thanks a lot

Alberto


Answers:
author: Patrik S
body: Hey [@Alberto gil rodriguez](/t5/user/viewprofilepage/user-id/4971070) ,

Welcome to Atlassian Community!

This might be a browser/cache issue, and in order to confirm if that is the case I would suggest doing the following :
> **1.** Trying to use a different browser
>
> **2.** Try using the browser's incognito mode
>
> **3.** Clear the browser's cache/cookies and load the page again
>
> **4**. If using any browser extension, disable them and try loading again.

You can try the suggestion above and let us know how it goes.

Thank you, [@Alberto gil rodriguez](/t5/user/viewprofilepage/user-id/4971070) .

Kind regards,

Patrik S


Tags: bitbucket-cloud
How to get all repositories that I can access via REST API 2.0 ?
Asked by Jayashankar R:

I've been trying to get all the repository details that I can access. Some repositories are forked. Some are under different projects but shared with me and has admin access. Still, I'm only getting the repositories that are owned by me.

I'm using REST API 2.0 from this documentation: <https://developer.atlassian.com/cloud/bitbucket/rest/intro/>

The API endpoints I've tried are:

GET /2.0/repositories

GET /2.0/repositories/{workspace}

GET /2.0/workspaces/{workspace}/projects/{project_key}

GET /2.0/user/permissions/workspaces


Answers:
author: Theodora Boudale
body: Hi [@Jayashankar R](/t5/user/viewprofilepage/user-id/4098906),

You can get all the workspaces your account has access to with the following endpoint:

```
GET /2.0/workspaces/
```

If you have access to repositories in e.g. 4 workspaces, that call should return these 4 workspaces.

Then, for each of these 4 workspaces, you can use

```
GET /2.0/repositories/{workspace}
```

where **{workspace}** replace with the workspace-id or the UUID for each of the 4 workspaces (the UUID should be enclosed in curly brackets).

Is this something that works for you?

If you're still having issues, could you please let me know:

1. Which of these 2 endpoints you are having issues with?  
   Does the first one not return all the workspaces?  
   Or does the second one not return repos for a specific workspace?
2. What kind of authentication are you using for the API calls?

Kind regards,  
Theodora

comments: author: Jayashankar R
body: Thank you [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086)

It worked like a charm. The issue was, I was trying to get the workspace using its UUID and I only took the UUID part after excluding the curly brackets. Now it works fine.


author: Theodora Boudale
body: That's good to hear [@Jayashankar R](/t5/user/viewprofilepage/user-id/4098906), thank you for the update!

I edited my previous response to add that the UUID should be in curly brackets, as you correctly noticed.

Please feel free to reach out if you ever need anything else!

Kind regards,  
Theodora


Tags: api

bitbucket-cloud

cloud

rest

rest-api
What do the different colored paths mean on the commit page of bitbucket?
Asked by Emily Dirkse:

When commits are made on the commit page between different people, there are multiple lines that have different colors and intersect on the left. What do these lines and colors mean? My guess is that they are different branches merging with each other, but I am not sure if that is right.


Answers:
author: Matija Varjacic
body: They are indeed different branches and their merges.
Bitbucket Runner, kubernetes 403 errors.
Asked by justinquaintance:

Trying to get a pipeline runner working in a Kubernetes cluster.

Followed this guide: <https://janosmiko.com/blog/2021-09-08-bitbucket-pipelines-runners-in-k8s/>

When I run the deployment I get the following error in the logs:

\[2022-06-20 18:37:30,261\] An error occurred whilst updating runner state to "ONLINE".  
com.atlassian.pipelines.stargate.client.core.exceptions.StargateForbiddenException: Response Summary: HttpResponseSummary{httpStatusCode=403, httpStatusMessage=Forbidden, bodyAsString={"error":{"message":"Forbidden","detail":"Could not find runner associated with oauth client.","data":{"key":"rest-service.rest-service.forbidden","arguments":{}}}}}

There is some issue with the actual key? When I check the environment variables the correct key is there.

Any ideas?


Answers:
author: justinquaintance
body: Found the solution, needed to include the REPOSITORY_UUID environment var!

comments: author: Jack Warnes
body: Hey [@justinquaintance](/t5/user/viewprofilepage/user-id/4970685) - this has just randomly started happening on our pipelines....where did you set this environment var?


author: Jack Warnes
body: For those who stumble on this - my solution was to upgrade the runners.


author: Pham Minh Man
body: Please give me more detail about upgrading the runners. Thanks


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Unable to log into Bitbucket
Asked by Sam Brain:

Hi - getting the following error when trying to log 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."

Have tried clearing cache and using incognito - but neither fixes issue.

Any help would be appreciated.

Thanks

Sam


Answers:
author: Theodora Boudale
body: Hi Sam,

Your Bitbucket Cloud account was set to inactive.

I went ahead and reactivated it, could you please try to log in now and let me know if it works?

Kind regards,  
Theodora

comments: author: Sam Brain
body: Thanks!


author: Rrrr
body: Even better is to fix this once and for all:

[vote](https://jira.atlassian.com/browse/BCLOUD-22664) to request a clear error message:

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


Tags: bitbucket-cloud

cloud
How many max number of Building using pipeline bitbucket
Asked by mahfoudh yosser:

Is there a max number of builds in pipeline for free account ?


Answers:
author: Patrik S
body: Hello [@mahfoudh yosser](/t5/user/viewprofilepage/user-id/3810717) ,

Thank you for reaching out to Atlassian Community!

Workspaces in the Free plan get 50 build minutes per month, with a max of 10 parallel steps running simultaneously. Once you run out of your build minutes, you will not be able to run your pipelines unless you upgrade your plan or wait for the next month's period. However, you also have the option to run your builds in [self-hosted runners](https://support.atlassian.com/bitbucket-cloud/docs/runners/), where the pipelines will run your scripts in your own infrastructure, and the build minutes will not be charged against your quota.

You can have more details about the pipelines limitations for each of the plans in the documentation below:

* <https://support.atlassian.com/bitbucket-cloud/docs/limitations-of-bitbucket-pipelines/>

Thank you, [@mahfoudh yosser](/t5/user/viewprofilepage/user-id/3810717) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud
Bitbucket pipelines does not substitutes deployment variables in all places.
Asked by Shoaib Khan:

Hi,

When I'm running my pipelines, all the deployment variables show up when I use "env" command this includes the namespace which I'm passing as ${OC_PROJECT}. But later in same script when I use it during deployment, its value doesn't get populated there. Because of which I'm getting errors during deployments.

helm upgrade -n ${OC_PROJECT} -i -f charts-config/.........![3.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/202597i0B2BBCA693A05FEF/image-size/large?v=v2&px=999 "3.JPG")![1.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/202598i74386A656035D31A/image-size/large?v=v2&px=999 "1.JPG")


Answers:
author: Patrik S
body: Hello [@Shoaib Khan](/t5/user/viewprofilepage/user-id/4439475) ,

Thank you for reaching out to Atlassian Community.

In order for us to investigate further, could you please share the bitbucket-pipelines.yml file of your build?

Also, from the screenshot, it seems you are executing a script file inside your build. If that is the case, could you also share the section from the script where you are referencing the variable? Have you tried referencing the env variable with $OC_PROJECT instead of ${OC_PROJECT}?

Kind regards,

Patrik S


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

deployment
Why is 'git rebase --continue' so difficult?
Asked by Gibran Shah:

Hello,

I'm confused about how merges work. I had a situation today where I tried to rebase my code and it told me I had to manually merge some changes. So I was able to do that in visual Studio 2015. Then I tried saying "git add \[myfile\]" and that seemed to work. Then I tried "got rebase --continue".

That's when things got confusing. It said: "WebAPI/Controllers/FileUploadController.cs: needs update. You must edit all merged conflicts and then mark them as resolved using git add." \<-- But there were no conflicts in FileUploadController.cs. I only removed a reference to System.Web.Http.Cors.

So I said: git add FileUploadController.cs. Seemed to work. Then I said: git rebase --continue. It complained again saying the same thing.

So then I tried undoing my changes to FileUploadController.cs. I said: git rebase --continue. This time it spat out the following error message:

"Applying: fixed unit test  
No changes - did you forget to use 'git add'?  
If there is nothing left to stage, chances are that something else  
already introduced the same changes; you might want to skip this patch.

When you have resolved this problem, run 'git rebase --continue'.  
If you prefer to skip this patch, run 'git rebase -skip' instead.  
To check out the original branch and stop rebasing, run 'git rebase --abort'."

Finally, I said: git rebase --skip, and that seemed to solve the problem.

So my question is: why is continuing rebase so bloody difficult after a merge? Why does it get so confused? There were absolutely no conflicts in FileUploadController.cs. It wouldn't even let me commit my changes to it. What's a guy supposed to do?


Answers:
author: Martin Taylor
body: I'm really dismayed that there are no answers to this HUGE issue. If I do a right-click and "rebase current changes onto master" in Sourcetree, and then have conflicts, there seems to be no way to finish the process in Sourcetree. The only way I can figure it out (if and when I remember) is to resolve the conflicts using my external tool (BeyondCompare) then go to the command line and do "git rebase --continue", then go back into Sourcetree and do a force push of the branch I rebased.

Why doesn't Sourcetree have a visual equivalent of "git rebase --continue"?


author: Marcello Romani
body: I found a good explanation here:

<http://wholemeal.co.nz/blog/2010/06/11/no-changes-did-you-forget-to-use-git-add/>

"Here, HEAD is the other branch version, not the one that is checked out."

"The error message is not very intuitive, but it does contain the answer. We just need to tell rebase to skip this patch. It's also not necessary to fix the conflict markers in the file. You will end up with the file version from the branch you are rebasing on."


author: Michael Solomon
body: +1


Tags: git

merge

rebase
When installing SourceTree what do I enter on the Log in screen?
Asked by Frank Yingst:

I have a username and I have an email address. Which do I enter in this login screen that comes up during the process of installing SourceTree? And if it is the email address, then when and where do I enter a username. The username is not the email address. I am attempting to install SourceTree on Windows so I can free up my MacBook for funner things.


Answers:
author: Lars Olav Velle
body: Hi,

It\`s the email address and your password from id.atlassian.com

Cheers,

Lars. Kantega Single Sign-on
source tree 2.0 Beta for windows, no open in directory?
Asked by ahmadrusadimuslim:

there is something miss in this version,

where do i find open in directory?

usually i only need to 'right click' and chose 'open in directory'

but now that button is no more, can someone help me.


Answers:
author: Ana Retamal
body: Hi Ahmad! Could you clarify to what functionality are you referring to? Where are you trying to perform 'open in directory'? What options do you get if that's not available?

It will also help if you post a screenshot, so we get a better idea of what are you trying to achieve.

Regards,

Ana