youngmon/atlassian-qna huggingface dataset:
How to download earlier version of source code from bitbucket without any tools
Asked by KY:

Hi there,

I was given a task to push source codes to bitbucket server and I have no issue in doing so using the git command. However, I am stuck when I was told to restore the source codes for an earlier commit. Assuming that I have make 10 commits for the source code and I wish to restore the codes for the 5th commit point. How can I pull the whole set of codes ? The download command shall download the latest codes and that is not what i wanted. Please advise.

Thank you


Answers:
author: Mikael Sandberg
body: Bitbucket do not have a feature to do a clone of a specific commit, mainly because Git does not have that option. To get a specific commit just clone the repository as normal and then you can do a git reset \<commit\> --hard

As of Git 2.5.0 you can ignore the security in Git and do a shallow clone to a specific commit, but both your server and client needs to be on Git 2.5.0 or above. Have a look at [Why Isn't There A Git Clone Specific Commit Option?](https://stackoverflow.com/questions/26135216/why-isnt-there-a-git-clone-specific-commit-option) for more information.


Tags: server
migration from azure devops to bitbucket
Asked by Santhosh M S:

Hi team,

need to migrate project code from azure devops to bit bucket, so can you help me here?

Thanks,

Santhosh M S


Answers:
author: Theodora Boudale
body: Hi Santhosh,

You can make use of the Import functionality in Bitbucket Cloud in order to migrate repos from Azure DevOps. If there are multiple repos, they need to be imported one by one, I'm afraid it's not possible to do a bulk import.

The import will migrate the Git repository only (with all the code and commit history), metadata like pull requests, permissions, etc are not migrated.

I found the following article which has step by step instructions on how you can do an import:

* <https://amald-nav.medium.com/migrate-azure-devop-repository-to-bitbucket-dc4692935104>

Did you have any specific questions about the migration that you need help with?

Kind regards,  
Theodora

comments: author: Osvaldo Guerra Lopez
body: Hello Theodora, I have a followup question. Once you do the migration, if I make a change in the Azure DevOps Repo, the changes do not reflect on the Bitbucket repo. How can I automate this new changes?


author: Theodora Boudale
body: Hi [@Osvaldo Guerra Lopez](/t5/user/viewprofilepage/user-id/4249602) , I have replied to the separate question you created about this here: <https://community.atlassian.com/t5/Bitbucket-questions/I-imported-a-project-to-Bitbucket-from-Azure-DevOps-how-can-I/qaq-p/1600955>


author: Sasidhar Navuluri
body: Hi Theodora,

Sorry for replying to the old post. I have a question regarding migration of repositories from ADO to Bitbucket. Can we use any REST APIs or Commands to perform this repo migration activity from ADO to BitBucket or we can only use GUI for this?

Regards,  
Sasidhar N


Tags: bitbucket-cloud

cloud
I cannot create a read only ssh key
Asked by kaarot_kalel_90:

Hello guys,

I'm trying to add a read only ssh key for a repository. I'm pretty sure there was an option when adding a ssh key to be read only but I cannot find it anymore. Do you now where is the option? If it was removed, any reason?

Thank you,  
Pierluigi


Answers:
author: Ana Retamal
body: Hi Pierluigi, thanks for reaching out!

Seems like you might be referring to access keys. It's possible to create access keys to allow a user or service to authenticate when pulling or cloning a repository over SSH, doing it in read-only mode. The way you'd create the SSH key is the same way as you'd create it for your account, but the following steps differ. You can find the instructions in the article [Add access keys](https://support.atlassian.com/bitbucket-cloud/docs/add-access-keys/).

Let us know if that's what you were looking for :)

Best regards,

Ana

comments: author: kaarot_kalel_90
body: Hi Ana,

<br />

yes you are right. I'm referring to access keys. But If I go into the repository -\> Repository Settings -\> Access keys -\> Add key, I cannot find the option read only. Here it is a screenshot. And after adding the Access key I cannot find a way to make it read only. I remember there was a checkbox to set the key as read only but I cannot find it anymore.   

Thank you,  
Pierluigi  
![Screenshot from 2020-11-10 17-13-37.png](https://community.atlassian.com/t5/image/serverpage/image-id/117734i80801BF7E36B91C5/image-dimensions/295x185?v=v2 "Screenshot from 2020-11-10 17-13-37.png")


author: kaarot_kalel_90
body: Hi Ana,

any news about this issue? I cannot find the option "read only"

Thank you,  
Pierluigi


author: kaarot_kalel_90
body: Hello,

Oh ok, my bad. The access key is automatically read-only, I've got it.

Thank you


Tags: cloud
Is there a way to commit and push multiple files to a bitbucket branch using rest API's.
Asked by Sneha Badera:

I want to commit and push multiple files of my application to a bitbucket branch using rest API's.


Answers:
author: Theodora Boudale
body: Hi Sneha,

Does this concern a Bitbucket Cloud repo (hosted on <https://bitbucket.org/>) or a Bitbucket Server one (self-hosted instance)?

The two products have different API.

In Bitbucket Cloud this is possible, you can do this using the following endpoint:

* <https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/src#post>

An example call would be

```
curl -X POST -u username:password https://api.bitbucket.org/2.0/repositories/repo-owner/repo-slug/src -F message="test commit message" -F branch=feature_branch -F folder1/my_file.txt=@/Users/tboudale/uploaded_file.txt
```

where  
**username** is the username of the Bitbucket account you are authenticating with  
**password** the password of this account or an app-password  
**repo-owner** is the workspace ID of the workspace this repo belongs to  
**repo-slug** is the repository slug

This command uploads the file */Users/tboudale/uploaded_file.txt* from my machine, to branch *feature_branch*.

This file is placed in the folder named *folder1* in that branch and the file in the repo is named *my_file.txt* (if the folder doesn't exist already, it will get created as well).

If you don't want to place the file in a certain folder, simply omit the part *folder1/* and use only the name you'd like this file to have in the repo.

I'm not sure if there is an API endpoint to do the same for Bitbucket Server. Please feel free to let me know if this concerns a Bitbucket Server repo, and I'll reach out to someone from Bitbucket Server support team to assist.

Kind regards,  
Theodora

comments: author: Sneha Badera
body: This is for the Bitbucket Server one (self-hosted instance), basically I have a branch checked out on my local machine and want to commit and push all the changed files to that branch on the server.


author: Theodora Boudale
body: Hi [@Sneha Badera](/t5/user/viewprofilepage/user-id/4155562) ,

Thank you for your reply.

This is possible via API for Bitbucket Server too with the following endpoint and PUT method:

* <https://docs.atlassian.com/bitbucket-server/rest/6.6.0/bitbucket-rest.html#idp200>

The documentation also includes an example curl call.

Please feel free to let me know if you need anything further.

Kind regards,  
Theodora


author: NayakS
body: [@Theodor Bogdanovic](/t5/user/viewprofilepage/user-id/508675) ,

Do we have any sample rest url for this instead curl.


Tags: bitbucket-server

rest-api

server
Existing Git repo on same server
Asked by Stephen Batty:

Hi.

I have installed bitbucket server on my existing server that host our git repo and jenkins.

Our git repo is located at /home/git/myrepo.git

How do I import that same repository into bitbucket on the same server ? I don't want to clone, I just want to point bitbucket to look at that repo.

So to summarize I have on the same box :

*/var/atlassian/application-data/bitbucket*

*/home/git/myrepo.git*

And I want bitbucket to read the exsting git data. Our git is current accessed using ssh keys


Answers:
author: Christian Glockner
body: Hi Stephen,

You'll need to follow the instructions described here: <https://confluence.atlassian.com/bitbucketserver/importing-code-from-an-existing-project-776640909.html#Importingcodefromanexistingproject-Importcodeusingtheterminal>

Cheers,

Christian

Premier Support Engineer

Atlassian

comments: author: Stephen Batty
body: That is just pushing code to a new repository ?

There is no way to use an existing repository ? I am trying to avoid having to get all my team to push to a new repo.


author: Christian Glockner
body: Hi Stephen,

No, if you want Bitbucket Server to host a repository you will have create one in Bitbucket Server and push the contents of the existing repository to it.

Cheers,

Christian

Premier Support Engineer

Atlassian


author: Stephen Batty
body: Ok. Thanks for the help.


Tags: bitbucket-server

git

server
Connect Bibucket/Jira cloud to local CI/CD
Asked by S?bastien PATTE:

Hi everybody,

due to recent post from atlassian that indicates they will stop to sell licenses for self heberged server, I am in trouble.

In fact, we have Jira server and Bitbucker in our local network. We use a solution for CI/CD based on jenkins and sonaqube, also on our local network.

If we leave our actual solution in profit of cloud licenses: how can I have a jira and bitbucket servers in jira's cloud and in same time my CI/CD into my local network ?


Answers:
author: Daniel Eads
body: Hello [@S?bastien PATTE](/t5/user/viewprofilepage/user-id/3648166) ,

While it is not available today, we do have an upcoming feature for Bitbucket Cloud - [Bitbucket Pipelines Runners](https://www.atlassian.com/roadmap/cloud?selectedProduct=&category=bitbucketNewFeaturesImprovements) - which will allow you to run a build pipeline on your own infrastructure. We expect this feature to be available well in advance of the end of support for server, which is not for another 3 years.

If you're interested in trying out Runners, let me know! I will get you in touch with the product team if you'd like to learn more.

Thanks,  
Daniel \| Atlassian Support

comments: author: S?bastien PATTE
body: Realy ? It don't exist some plugin which can connect a local CI/CD to a jira's cloud instance ?


author: Daniel Eads
body: For connecting Jira Cloud to a local Jenkins server, you can [follow these instructions and use the Atlassian Jira Software Cloud plugin for Jenkins](https://support.atlassian.com/jira-cloud-administration/docs/integrate-with-jenkins/) .


author: Parshva Shah
body: I am not able to connect my local jenkins deployed on vm through the jira cloud.

Only giving below error nothing in detail. Can you help me out ?

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


Tags: jenkins

jira

migration-customer-care

server
Problem with Bitbucker Server following system restart
Asked by dcode:

Hello,

We recently had our IT support company install bitbucket server by following the online instructions. The server software is installed on Windows Server 2019. A SQL Server database is on another system. The bitbucket version is 7.5.2.

None of use have any experience with this software. However, the install appeared to go smoothly and afterwards we could access the bitbucket server Administration webpage.

The user that is using bitbucket just reported that it hasn't been working lately. When I go to the server URL, the Bitbucket Setup page is displayed. I selected External database and re-entered the database information hoping that would fix the problem but instead it complained that it needed an empty database for setup. I don't see any links to allow me to do anything but run setup again.

Event viewer shows that the system was rebooted a few days ago so I suspect that's what broke things.

How do I point the server at the existing database to get things working again? And how do we prevent future reboots from causing problems?

Thanks.


Answers:
author: dcode
body: The IT support person that installed this for us determined that when the system restarted, the Bitbucket service restarted using the wrong directory. He reconfigured the service to use the correct directory and that fixed the problem.


Tags: bitbucket-server

server
How do you start a background process with pipeline ssh-run?
Asked by ???:

I want to restart my Spring Boot service, by executing the .jar file I upload with pipeline.

The code below successfully starts the service, but the pipeline doesn't end because it runs on foreground.

```
- pipe: atlassian/ssh-run:0.2.6
  variables:
    SSH_USER: $USER
    SERVER: $SERVER
    COMMAND: 'pkill -9 -f app.jar | .../app.jar'
```

So I tried below, using nohup command. However, it doesn't start my service. The pipeline says the result succeeded but the service is not being launched.

```
- pipe: atlassian/ssh-run:0.2.6
  variables:
    SSH_USER: $USER
    SERVER: $SERVER
    COMMAND: 'pkill -9 -f app.jar | nohup .../app.jar &'
```

Someone said when nohup command doesn't work, try putting 'sleep 1' next to it.

```
- pipe: atlassian/ssh-run:0.2.6
  variables:
    SSH_USER: $USER
    SERVER: $SERVER
    COMMAND: 'pkill -9 -f app.jar | nohup .../app.jar & sleep 1'
```

Now it successfully starts the service. The problem is, the pipeline result says it 'failed', and Bitbucket sends me email about the failed pipeline every time, which is very annoying. (And I can't disable it in settings!)  

So I want to know how people use ssh-run command to run background service.  

Thank you.


Answers:
author: Halyna Berezovska
body: [@???](https://community.atlassian.com/t5/user/viewprofilepage/user-id/4153571) now when you figured out with your command, please share the logs where pipeline fails.

It will help us to discover the root cause.

If you have some sensitive info in logs, you may mask any string you'd not like to show up


Tags: bitbucket-pipelines

ssh-run
How can I give another person the permission of a page
Asked by Matt:

I am the owner of a page and I gave **View\&Edit** permissions to another person, but he is still not able to alter restrictions on a page. How can we change this?

I could "pass ownership" to him if there's any way to do this. He needs to be able to change restrictions (View/Edit) for this page, not me.


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Nosalvation7](/t5/user/viewprofilepage/user-id/5135202) and welcome!

The following article could clarify your doubts <https://confluence.atlassian.com/doc/page-restrictions-139414.html>

*To add or remove page restrictions, you'll need to have permissions to edit the page and 'Restrict' or 'Admin' permission in the space.*

Hope this helps,

Fabio
Confluence page has duplicated contenets
Asked by Preeti Yadav:

We have confluence page for where content of the page is getting duplicated.

Is it some software bug? How to fix this issue, please guide.

We are using

* [Atlassian Confluence](http://www.atlassian.com/software/confluence) 7.13.0


Answers:
author: Nic Brough -Adaptavist-
body: The usual way to "duplicate" information from one page to another is to not copy it, but include it.

Have a look at the page that is taking up the data from another page, and edit it. I think you'll find it just says "include : \<name of source page\>"


author: Alex Koxaras _Relational_
body: Hi [@Preeti Yadav](/t5/user/viewprofilepage/user-id/4979798)

Can you please elaborate more on what do you mean by "content of the page is getting duplicated"? Is it some content or all the page? Can you share some screenshots? Did you manage to locate when and how this happens? I mean under which circumstances this occurs.

comments: author: Preeti Yadav
body: Hi [@Alex Koxaras _Relational_](/t5/user/viewprofilepage/user-id/4150197) ,

Here in below screenshot you can see, we have separate meeting's year wise information, as 2021,2020etc.

Whenever adding any other year and then publishing the page. The whole thing is again duplicating below this. Not for only one time but for 2-3 time this same content is getting duplicated in the same page.

![two.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/237825i5DE7F9B4A1E816EE/image-size/large?v=v2&px=999 "two.jpg")![one.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/237826i0FD2F83CF2268E8A/image-size/large?v=v2&px=999 "one.jpg")


author: Nic Brough -Adaptavist-
body: That looks like you have a macro listing some dates for your meetings. If it is repeated, it's likely that your page simply has several instances of the same macro on the page.


Tags: confluence-server

server
Why my confluence app was suspended please resolve my problem
Asked by mdimran20117:

Hello sir my confluence app was suspended please resolve my problem 7794964209 my mobile number


Answers:
author: Trudy Claspill
body: The most frequent reason for a product to be suspended is because billing could not be completed.

Refer to the answers from Atlassian Team Members on this post for more information:

<https://community.atlassian.com/t5/Jira-questions/How-to-re-subscribe-to-suspended-subscriptions/qaq-p/799563>


author: Alex Koxaras _Relational_
body: Hi [@mdimran20117](/t5/user/viewprofilepage/user-id/5135136) and welcome to the community,

Let me start by saying that this is not Atlassian's support, but its community. We can't phone you to resolve your problem, but only we can provide certain solutions if we have all info. With that said, can you please explain what do you mean by "suspended"? Any screenshot of the error?


Tags: cloud

confluence-cloud
How to show field in specific status without screens
Asked by Mkurama:

Hi

I just want to show custom field in specific some status.

Also, I want it to shown in main screen of issue like the image below:

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/237525i433618CF621421F5/image-size/large?v=v2&px=999 "Capture.PNG")

Thanks.


Answers:
author: Dave Mathijs
body: Hi [@Mkurama](/t5/user/viewprofilepage/user-id/4687169) ,

First of all, you need to create 3 different issue operation screens in your screen scheme:

1. create issue screen
2. view issue screen
3. edit issue screen

If you don't want to show certain custom fields on the view issue screen, you can just remove them.

You can stil use the **Edit** button to fill out those custom fields.

Or even limit is to the create issue screen or place those fields on a transition screen so they can only be filled out when going from one status to another.

Is that what you're looking for?

comments: author: Mkurama
body: There is no solution without create new screen?

Thanks


author: Nic Brough -Adaptavist-
body: No, that is what screens are for. I can't imagine why you might think there is another way to do it.


Tags: confluence-server

jira

server
IRAG meter on an excel spreadsheet How do i include in my confluence space and have pointer work
Asked by Bryn Koning:

I have created a RAG meter (Graph, donut and Pie) I wish to insert this into a confluence document and retain the ability to be able to change the pointer value (remotely or on page) and have the pointer move to the appropriate colour.

I have attempted using the Exel macro and charts and cannot have more than one chart disply and i am unable to get this to reflect the RAG meter i have in excel?


Answers:
author: Katerina Rudkovskaya [Stiltsoft]
body: Hi [@Bryn Koning](/t5/user/viewprofilepage/user-id/3559584),  

We can suggest trying our [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?tab=overview&hosting=server&utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) app and its [Table Spreadsheet](https://docs.stiltsoft.com/tfac/dc-server/how-to-use-table-spreadsheet-macro-83100938.html?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macro.  

You'll be able to import your data in xlsx or csv formats and use Excel-like functionality right in Confluence.  

And if you prefer to work with native manually created Confluence tables, you may reuse your source table several times with the help of the [Table Excerpt/Table Excerpt Include](https://docs.stiltsoft.com/tfac/dc-server/how-to-use-table-excerpt-and-table-excerpt-include-macros-42241623.html?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macros and visualize each reused table separately with the help of the [Chart from Table](https://docs.stiltsoft.com/tfac/dc-server/how-to-use-chart-from-table-macro-42239655.html?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macro.


Tags: chart

chart-from-table

confluence-server

filter

ms-excel

server

table

table-excerpt

table-filter

table-filter-and-charts

table-spreadsheet
Set field value with validation rule
Asked by Gustavo Ortega Reynoso:

Good night,  
I want to set the value of a text field with a specific legend and also configure it as read-only, this depending on the value of a combo field, can you please help me?


Answers:
author: Bhanu KN
body: Hi [@Gustavo Ortega Reynoso](/t5/user/viewprofilepage/user-id/4477587)

Hope you are doing well :)

So, you want to make a certain field read-only based on the value of another field. Sadly, we cannot achieve this with Jira alone.

You might want to explore [Behaviours](https://docs.adaptavist.com/sr4js/latest/features/behaviours) on the [Scriptrunner](https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?tab=overview&hosting=cloud) plug-in.

Good day:)

Bhanu

comments: author: Gustavo Ortega Reynoso
body: Thanks a lot, dear Bhanu, in fact I got it set the field's value that is a advantage.

See u.


Tags: cloud

confluence-cloud
How to prevent Horizontal Scrollbar for Tables in Templates?
Asked by Gabriel McKenna:

So we have several templates, between global templates and templates local to some specific spaces but they all seem to have this common issue that I am not sure how to resolve. That issue is that when modifying the template the tables look like this:

![Screenshot 2023-01-31 170515.png](/t5/image/serverpage/image-id/237495i568CFEB62AFE2511/image-size/large?v=v2&px=999 "Screenshot 2023-01-31 170515.png")

But then when I am starting to fill them in this happens and it makes the page clunky to navigate and fill in the content because no matter how large/small the content is it forces the table to have a horizontal scroll bar, instead of fitting it to the area and wrapping the lines to fit appropriately within the cells like I would expect it to.

![Screenshot 2023-01-31 170618.png](/t5/image/serverpage/image-id/237496iDABE540446BF82A6/image-size/large?v=v2&px=999 "Screenshot 2023-01-31 170618.png")

I don't have any documentation on this, but I do not remember this happening until a few months ago. Is this just a bug in Confluence that is getting worked on?


Answers:
author: Alex Koxaras _Relational_
body: Hi [@Gabriel McKenna](/t5/user/viewprofilepage/user-id/4747099)

This could possibly be a bug, but in my experience UX bugs with minor productivity impact (like the one you mention) will not be fixed soon. Can you try and reduce the column size of the template and see if that can resolve the issue? Can you also check that there is no white space after the text placeholders? Lastly can you also check that "TOTAL HOURS" has just a right alignment and it's not white space?


Tags: cloud

confluence-cloud

scroll

table