youngmon/atlassian-qna huggingface dataset:
Bamboo to Bitbucket SSH Issue
Asked by Mir Asif Ali:

We have setup Bamboo Server and BitBucket data centre on different nodes on AWS.

We have successfully created Application links between these two.

However when we try to create Linked repositories from Bamboo to Bitbucket we get a 504 Gateway error.

We have enabled SSH on bitbucket on default port 7999 and also set the SSH Base URL.

Can someone please help?


Answers:
author: Luis Francisco Rey Mill?n
body: Hi [@Mir Asif Ali](/t5/user/viewprofilepage/user-id/4448173) .

Did you ever get to find a solution to this problem? We are suffering exactly the same issue right now while migrating our existing applications to AWS.

Any help would be highly appreciated.

Kind regards.  
Luis.


Tags: bamboo

bitbucket-server

server
Post Install Redirect for apps, has something changed?
Asked by Emma Moinat:

In my appDescriptor I have set up a postInstallRedirect like so:

```
modules: {
    postInstallRedirect: {
        key: 'redirect',
        url: `https://bitbucket.org/{user_username}/workspace/settings/addon/admin/${appKey}/repository-settings?post-install=true`
    }
```

This used to work perfectly but recently something has gone wrong and now after installing I see the page as follows:  

![Screenshot 2021-06-22 at 16.45.58.png](/t5/image/serverpage/image-id/148416i82CC36BCA3B54104/image-size/large?v=v2&px=999 "Screenshot 2021-06-22 at 16.45.58.png")

Can someone help explain how this could have happened?   
I see no change logged in this area from Bitbucket?  

Thanks in advance,  
Emma


Answers:
author: George Mihailoff
body: Maybe something to do with the rollout of the new UI.

<https://community.atlassian.com/t5/Bitbucket-questions/How-can-I-enable-the-new-bitbucket-interface/qaq-p/583276>


Tags: bitbucket-cloud

cloud
Can I generate an access and refresh token without a premium account?
Asked by sistemasirisbond:

Hello, I'm trying to create a a backup of my repositories in a local machine. For it, I'm using a script, but I need to generate a refresh token, and I dont seem to have that option in my account.

These are the steps I followed:

1. I created an auth consumer, with reading permissions

2. created an app password

3. tried this url <https://bitbucket.org/site/oauth2/authorize?client_id={key_provided_by_the> auth_consumer}\&response_type=code

----\>this gives me the following error:

Invalid redirect_uri

This integration is misconfigured. Contact the vendor for assistance.

\<----------------


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

You don't need to have a workspace on the Premium plan in order to use OAuth.

Please note that in the URL you provided:

```
https://bitbucket.org/site/oauth2/authorize?client_id={key_provided_by_the auth_consumer}&response_type=code
```

you'll need to replace **{key_provided_by_the auth_consumer}** with the consumer key, so ++no curly brackets in the URL++.

If you have the key enclosed in brackets in the URL, you'll get the error message you mentioned.

Could you please let me know whether the URL you use has curly brackets around the key and if it works without them?

Kind regards,  
Theodora


Tags: authentication

bitbucket-cloud

cloud
404 Error when calling REST API
Asked by Lukas K?rber:

Hi

when trying to call the REST API of Bitbucket-Server with the following URL

\<host\>/rest/api/1.0/projects/\<project-key\>/repos/\<repo-key\>/raw/\<path-to-file\>?at=develop

to retrieve a raw .py file I receive a 404 Error. Currently I am using Bitbucket Server v4.9.1.

Is this functionality not yet included in the version I am using or is there a workaround?

Would be awesome if anyone could help me here, thank you!


Answers:
author: Christian Glockner
body: Hi Lukas,

Yes indeed, that REST API endpoint does not yet exist in version 4.9.1, which is a very old version of Bitbucket Server. You can find the REST API reference for that version at <https://docs.atlassian.com/bitbucket-server/rest/4.9.1/bitbucket-rest.html>.

Cheers,

Christian

Premier Support Engineer

Atlassian

comments: author: Lukas K?rber
body: Thanks a lot Christian!


Tags: bitbucket-server

server
Config
Asked by Bilal SOYALP:

Hello,  
I am encountering such a problem on the Bitbucked server that we have just installed on windows server 2019. Can you please help.


Answers:
author: Hyrum Steffensen _Appfire_
body: Hello Bilal,

Thanks for asking for help! I may not be able to provide an answer, but please answer the following and perhaps another community member can provide assistance:

* Please describe the nature of the issue.
* What is the expected result?
* What is the actual result?
* What kinds of error messages do you see in the [Bitbucket logs](https://confluence.atlassian.com/bitbucketserver/enable-debug-logging-776640147.html#:~:text=Logs%20can%20be%20found%20in%20%2Flog%20.)?

Regards,

Hyrum

comments: author: Bilal SOYALP
body: Hi Hyrum,  
I thought I added the details. I am so sorry. I am sharing screenshots of the error.

![Screenshot_1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/148382i225E54816687F64F/image-size/large?v=v2&px=999 "Screenshot_1.jpg")![Screenshot_2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/148383i31C3F9CDEB9D1D7B/image-size/large?v=v2&px=999 "Screenshot_2.jpg")![Screenshot_3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/148381i33ACFDF923BC879A/image-size/large?v=v2&px=999 "Screenshot_3.jpg")


Tags: bitbucket-server

server
Recovery deleted repository on Cloud and PC, HELP!
Asked by Facundo Pi?ero:

Hi!,

I was pulling repository to Bitbucker and in a moment I saw branch empty, and even worse, my local repository folder on PC WAS EMPTY. I've lost all my files.  
When I do a git status I see this:  

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

Please help me recover all this files!!  

Thanks


Answers:
author: Facundo Pi?ero
body: Hi Theodora! , this gave back my files! , Thanks you so much!!  

Best regards,

Facundo

comments: author: Theodora Boudale
body: That's good to hear, I'm glad to have helped and you are very welcome!

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

Kind regards,  
Theodora


author: Theodora Boudale
body: Hi [@Facundo Pi?ero](/t5/user/viewprofilepage/user-id/4447282) ,

Looking at the screenshot you provided, it looks that certain files were deleted, however, these changes have not been staged or committed yet.

If your local repository is in the same status right now, you can undo these changes/deletions with the command

```
git restore .
```

Please let me know if this helps in undoing these changes and recovering your repo.

You mention in your title "deleted repository on Cloud and PC". Is the Bitbucket Cloud repo deleted itself? Or are files/commits missing from the Bitbucket Cloud repo as well?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Use SSH private key as repository secret variable
Asked by Mike Pham:

Hi,

I'm trying to set my SSH private key as a secret variable of my repository. The SSH key is in this format

```
-----BEGIN OPENSSH PRIVATE KEY-----
AAAAAAAAAAAAAAAAAAAAA....

AAAAAAAAAAAAAAAAAAAAA....

....
-----END OPENSSH PRIVATE KEY-----

```

The key doesn't register correctly because (I think) it spans across multiple lines and BitBucket only supports single line variables (again, I think).

I'm not sure if I'm missing something obvious, but can I use my ssh private key as a secret variable?

Currently I'm using a workaround which is to base64 encode it

```
cat ~/.ssh/id_rsa | base64
```

and then use that string as the private variable. However, there's a big issue with this approach: someone can make a new sneaky commit when I don't notice and steal my private key by adding this line to the pipeline

```
echo $PRIVATE_KEY_B64 | base64 --decode
```

Thanks,

Mike


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

You are correct that Pipelines does not currently support line breaks in environment variables, which is the reason why a private SSH key needs to be encoded in order to be added as a variable.

There is a risk associated indeed; when you set up SSH in Pipelines for a Bitbucket repository (either using a variable or using the **SSH keys** page in the **Repository settings**), all users with write access to the repo will have access to the remote host.

I am quoting from our [documentation](https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/), specifically for using SSH keys as a secured variable:
> There are security risks associated with passing private SSH keys as repository variables:
>
> * Repository variables get copied to child processes that your pipelines build may spawn.
> * Secured variables can be retrieved by all users with write access to a repository.
>
> We recommend that you never pass your own personal SSH key as an repository variable, but instead generate a new SSH key-pair for Pipelines that easily be disabled if it is compromised. It may also be worth using deployment variables, which you can combine with deployment permissions to control access.

If you don't want users with write access to the repo to be able to access the SSH key, you can use [deployments](https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-monitor-deployments/), define the SSH key as a deployment variable and then use the option "*Only allow admins to deploy to this environment*" for this deployment environment (this is available for workspaces on the Premium plan).

In this case, if a non-admin triggers a deployment, the build will get paused. This way, admins can review the commits made and then manually resume the build or decide not to run it.

You can read more about this in the following blog post:

* <https://bitbucket.org/blog/deployment-permissions-now-available-in-bitbucket-pipelines>

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

variable
how to restrict branches to merge code to master branch on bitbucket cloud
Asked by yuttarwar:

Hi All,

We are planning to restrict branches to merge code to master branch, so could someone help us to share the steps.

Our requirements:

1. Only feature and bugfix branch can be merged in development branch.

2, Only development and hotfix can be merged into master.


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

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

The branch permissions we have available allow you to prevent some or all users from pushing to a certain branch, require a pull request to merge into a branch, and more that is mentioned in this [documentation page](https://support.atlassian.com/bitbucket-cloud/docs/use-branch-permissions/). However, it is not possible to restrict that only certain branches can be merged into another branch.

We have the following feature request in our issue tracker:

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

I believe this is what you are looking for? If so, I would suggest that you add your vote in the feature request ticket (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.

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

Kind regards,  
Theodora

comments: author: Sebastian Dietrich
body: Unfortunately <https://jira.atlassian.com/browse/BCLOUD-15394> was closed some weeks after this request (due to inactivity). IMHO wrongly, since every team using a separate develop and main branch besides other (e.g. feature-)branches needs such a feature.


author: Theodora Boudale
body: Hi Sebastian,

Thank you for the feedback.

There is a note in the feature request comments explaining the closure.

You are more than welcome to leave a comment even in closed feature requests to express your interest, as our product managers continue to monitor them.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
How to add CSS to Space Template without using any macros?
Asked by Jitesh:

Dear experts,

I am trying to add CSS in a template within my Space. I have the admin rights and can change the space theme from look and feel. But that will change all the pages.

I just want to add the CSS to the pages that are created using my template.

Is there any way to do this without using macro. I don't want to use the CSS macro as user can see that when they press the edit button.

Or is there any other way to hide the CSS macro when user edit the page?

Regards,

Jitesh


Answers:
author: Brant Schroeder
body: [@Jitesh](/t5/user/viewprofilepage/user-id/5203621) welcome to the Atlassian community

If you are only adding to a single page you would need to use the macro. If you are adding to the who site then you can use the header.


Tags: confluence-server

server
Clients are not able to see JIRA macros
Asked by JONATHAN BOHLMANN:

We have a status page in confluence that our customers access (per project). We are using the OOTB JIRA macros to show a count and graphs of their JIRA tickets. Since we are using JSM, they client is getting errors when viewing the page. Is there a macro out there that allows a portal/JSM client to see a list of tickets/counts in Confluence?![cda9a9da-00b5-45e9-b93d-f5db40cadeab.png](https://community.atlassian.com/t5/image/serverpage/image-id/253653i5DAB7581F9085F6F/image-size/large?v=v2&px=999 "cda9a9da-00b5-45e9-b93d-f5db40cadeab.png")


Answers:
author: JONATHAN BOHLMANN
body: We ended up putting an iframe in the status page.


author: Alex Koxaras _Relational_
body: Hi [@JONATHAN BOHLMANN](/t5/user/viewprofilepage/user-id/652237)

No there isn't a way and out of the box, to do that in Jira. Inside your confluence you could paste an image of the results. If a client doesn't have a valid license and project membership, he/she will not be able to see anything from Jira.

So you can either paste a still snapshot of your results, of buy a 3rd party app like Dashboard hubs, which store some date outside of confluence and can easily share a dashboard with clients.


Tags: cloud

confluence-cloud

jira-service-management-cloud

macro
How to set space icons to be used as favicon (browser tab icon) in Confluence
Asked by Johnathan:

Greeting Community!

Has this been resolved? It is a great feature in jira, and would be equally great in conflulence, as we all know the we end up with lots of tabs open.

Does anyone know if this has been resolved or implemented for Confluence?

Here is the link from a 2014 questions:

<https://community.atlassian.com/t5/Confluence-questions/confluence-How-to-set-space-icons-to-be-used-as-favicon-browser/qaq-p/226346>

Best!


Answers:
author: Johnathan
body: Thanks Alex,

Surprise they would not implement this change, the favicon in tabs in jira is super useful, as we know, you always end up with a ton of tabs open are you roll around getting work done.

Best, thanks for input.


author: Alex Koxaras _Relational_
body: Hi [@Johnathan](/t5/user/viewprofilepage/user-id/4690223)

There can be only one favicon, and that's for the entire confluence instance and not per space. The corresponding cloud jira suggestion has been closed as "Wont fix" <https://jira.atlassian.com/browse/CONFCLOUD-33245>

So I wouldn't expect this feature implemented anywhere in the near future.


Tags: cloud

confluence-cloud
Create a checklist in Confluence that creates a task in Jira when certain questions are answered
Asked by DWedekind:

I want to create a checklist in Confluence that creates a task in Jira when certain questions are answered "YES".  
But since I have never done something like this before, I have no idea how to implement something like this.  
Can someone here show me a way?  
Confluence runs on LTS 7.13.13, Jira on 9.4.3.  
In Confluence "Handy Macros for Confluence" and "Table Filters and Charts" from Stiltsoft would be available.


Answers:
author: Kishan Sharma
body: Hi [@DWedekind](/t5/user/viewprofilepage/user-id/1147839)

Out of the box this functionality is not available within Confluence. You will have to build your custom solution for your requirement. For example, write a script that will read your confluence page and based on certain keywords within it, post a rest api call to Jira to create a task. Alternatively you can also reach out to Stiltsoft support to? [REQUEST FEATURE](https://docs.google.com/forms/d/e/1FAIpQLSdPkKyl3JOVxZ16WrHyC4E84duPmHNHuSc6Rv99HTi-epw1WA/viewform) or? [SUGGEST IDEA](https://stiltsoft.atlassian.net/servicedesk/customer/portal/9/group/9/create/90) and see if they can help you in anyway.


author: Stiltsoft support
body: Hi [@DWedekind](/t5/user/viewprofilepage/user-id/1147839) ,

Unfortunately, the Table Filter and Charts for Confluence and Handy Macros for Confluence apps won't help you with the case.

We'll be able to set statuses (emails and clickable links) based on the contents of your table. But we can't create tickets in Jira. Both of the apps work only with Confluence.


Tags: checklist

confluence-server

filter

issue

jira

server

table

task
How do I delete uploaded files from appearing on my Team's Confluence page?
Asked by Marc Brustman:

Hello Team, I have multiple files uploaded to our team's confluence repository. I recently created a 'child page' to upload/store files for team visibility however I need to delete/archive ones that are no longer relevant. I don't see that function. How do delete/remove an unwanted file? Thanks for your input.


Answers:
author: Brant Schroeder
body: [@Marc Brustman](/t5/user/viewprofilepage/user-id/5203400) Welcome to the Atlassian community

Easiest way is to remove the files at the space level. Here are instructions on how to do so <https://support.atlassian.com/confluence-cloud/docs/manage-uploaded-files/>
Table Filter macro
Asked by Juan Fuentes:

I am trying to create a filter for Jira issues that filter by a specific Epic. So in my project I have 10 Epics but for a specific status I only want to show 1 Epic and all its task under it. I can get the specific Epic to show but none of the task. Any ideas

I tried the following

project = AVOB AND issuetype = Epic AND epicLink = (AccountRating)

project = AVOB AND issuetype = Epic AND epicLink = accountRating

project = AVOB AND issuetype = Epic AND epiclink = accountRating

project = AVOB AND issuetype = Epic AND epic = accountRating


Answers:
author: Trudy Claspill
body: Hello [@Juan Fuentes](/t5/user/viewprofilepage/user-id/5195561)

Your syntax is incorrect.

If you want the results to show the Epic and  
its child issues, and   
"AccountRating" is the name of the Epic, and  
the issues are in a Company Managed project in Jira...

then the syntax you need is this:

project=AVOB and ((issuetype=Epic and "Epic Name"="AccountRating") or ("Epic Link" = "AccountRating"))

**(issuetype=Epic and "Epic Name"="AccountRating")** gets you the Epic named "AccountRating".

**("Epic Link" = "AccountRating")** gets you the child issues of that Epic.

Combining those two statements with an OR gets you both sets of issues.

**project=AVOB** limits the returned results to only issues in the AVOB project.

For more information on JQL options refer to this documentation.

<https://support.atlassian.com/jira-software-cloud/docs/use-advanced-search-with-jira-query-language-jql/>

comments: author: Juan Fuentes
body: Thank you for the help. I tried it and it did not work . But I did get further I now get no search results found. I confirmed the Epic Link

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


author: Trudy Claspill
body: It appears that your Epic Link/Epic Name is "Account Rating" with a space. If you put it in the query without a space, that would explain why no results are found.

After fixing that if you still get no results then please show us the actual filter you are trying to use.


author: Juan Fuentes
body: I cant believe over a space i had an issue. I had assumed I had to eliminate the space when referencing the table. I was wrong thank you it worked


author: Trudy Claspill
body: Glad I could help!

If your problem has been solved, please consider marking the Answer as Accepted to help other users find posts with validated solutions.


Tags: cloud

confluence-cloud
Confluence set up page not loading properly
Asked by manisha sharma:

Hello Team,

I had the initial set up on the EC2 for JIRA software with a postgres RDS DB. It was all working fine.

Now, I needed to integrate confluence with JIRA, so I went ahead and installed/comfigured confluence on same EC2 and used the same DB.

Now, I am unable to login to my jira website, do you think we would need to use a differnet db for confluence because even the confluence page is loading very bad.


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@manisha sharma](/t5/user/viewprofilepage/user-id/5201667) ,

you need to setup Confluence with a different DB name. DBMS (Postgres) can be the same.

Fabio

comments: author: manisha sharma
body: So when you say, a different db name, it means another database I need to create for confulence with the database engine as postgres. is it?


author: manisha sharma
body: Also, now, both jira and confluence seems to be broken as you can see:

<http://10.124.157.124:8080/>

<http://10.124.157.124:8090/>

What would you suggest next, because we are not able to login to the jira website anymore and this is what my confluence page throws up. attached![Screenshot 2023-04-24 at 8.24.29 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/253622i48F6D6031AC11ADF/image-size/large?v=v2&px=999 "Screenshot 2023-04-24 at 8.24.29 PM.png").


author: Fabio Racobaldo _Herzum_
body: Hey [@manisha sharma](/t5/user/viewprofilepage/user-id/5201667) ,

the same postgres can contain two different dbs (one for jira and another for confluence). Btw, in order to connect JIRA and Confluence you need to setup an application link between JIRA and Confluence (<https://confluence.atlassian.com/doc/linking-to-another-application-360677690.html>). I don't know what is that action connectorjira.action

Fabio


author: manisha sharma
body: Hello,

I tried following the above link related to linking the application and seeing the below error:

We can't connect with [Confluence](http://10.124.157.72:8090/admin/listapplicationlinks.action) because a reciprocal application link is missing on that server. You'll need to delete and then re-create this application link

![Screenshot 2023-04-25 at 9.13.28 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/253836iA1817A768499F190/image-size/large?v=v2&px=999 "Screenshot 2023-04-25 at 9.13.28 PM.png")![Screenshot 2023-04-25 at 9.17.45 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/253837iF5D374FA5DC0803B/image-size/large?v=v2&px=999 "Screenshot 2023-04-25 at 9.17.45 PM.png")


author: manisha sharma
body: Can anyone please take a look into this.


Tags: confluence-server

server