youngmon/atlassian-qna huggingface dataset:
Error when import / add a repository from one workspace to another in Bitbucket?
Asked by aliang:

We need to clone repository from another company's. Since their repository isn't public one, I can't use "Add Existing Repository" feature.

So, here is what we did

1. I was invited to the other company's Bitbucket. I only gave my Bitbucket's username and email address to the other company.

2. One additional workspace shown on my Bitbucket workspace list, say this workspace's name is WKSP_A

3. I want to clone repo from WKSP_A to our existing WKSP_OWN. So I am at the project of WKSP_OWN

a. click on "+" on left panel -\> Import Repository

b. Give the URL from repo at WKSP_A. The URL was copied from WKSP_A repo with syntax *https://\<my username\>@bitbucket.org/\<WKSP_A\>/\<repo name\>.git*

c. Fill in my current workspace name WKSP_OWN, project name and repo name that I want in my WKSP_OWN

d. click on "Import repository", below is the error msg. I am attaching the screenshot of the error msg as well.

*(* below is text version*)* {#toc-hId--1324075773}
---------------------------------------------------

*Importing repository* {#toc-hId-1163437060}
--------------------------------------------

*We're getting things warm and cozy for your code.*

***Your import has failed. For more information, check the log below. You can also try your import again.***

1. *16:31:39 git import for: [https://bitbucket.org/WKSP_A/\<repo_name\>.git](https://bitbucket.org/heartbeam/androidapp.git)*
2. *16:31:39 Cloning [https://bitbucket.org/](https://bitbucket.org/heartbeam/androidapp.git)[WKSP_A/\<repo_name\>](https://bitbucket.org/heartbeam/androidapp.git)[.git](https://bitbucket.org/heartbeam/androidapp.git)...*
3. *16:31:39 Cloning into bare repository '\<company bitbucket name\>/androidapp'...*
4. *16:31:39 remote: Invalid username or password*
5. *16:31:39 fatal: Authentication failed for 'https://\<my username on Bitbucket\>@bitbucket.org/WKSP_A/\<repo_name\>.git/'*
6. *16:31:39 Remote Git clone failed: \<class 'bitbucket.apps.asyncx.tasks.ImportException'\>: Command failed. Return value: 128*


Answers:
author: Tyler T
body: Are you trying to fork the repository or work directly on the repository?


Tags: bitbucket-cloud

cloud
Missing Comment on Commit
Asked by jonF:

How do I see a comment for a participant on a commit? The commit has more than 50 files changed/added and I do not see the comment for the participant on any of the files.


Answers:
author: Theodora Boudale
body: Hello,

Could you please let me know where is the repository with this commit hosted?

If I check your account in our system, I can see that you have a Bitbucket Cloud account, but it doesn't own or have access to any repos.

I can also see that you have access to a JIRA Cloud instance, but I am not sure what DVCS it is connected to.

You mention that you cannot see the comment for a certain participant; is this comment missing from the commit page of the repo, where the repo is hosted?

Kind regards,  
Theodora

comments: author: jonF
body: Thanks Theodora. I think I already have an answer for this question.


Tags: cloud

jira-software

jira-software-cloud
Is it possible to exclude files from being removed with DELETE_FLAG in an S3 pipeline?
Asked by Kind:

Hello,

I am working on an s3 pipeline for a project I am working on. I would like to utilize the DELETE_FLAG variable to empty the destination bucket before the pipeline deploys the latest built code, but I would like to exclude a particular set of files from being removed during this process. Typically I do this manually with the following S3 command: aws s3 rm --recursive --exclude "sitemap\*" s3://BUCKET  

I was looking at the EXTRA_ARGS variable but this appears to only apply to what is being uploaded to the bucket. Is there any way for me to prevent files with the name sitemap (wildcard) from being deleted when using the DELETE_FLAG variable in my S3 pipeline?


Answers:
author: G_ Z_
body: Hello, [@Kind](/t5/user/viewprofilepage/user-id/4072755) !

Actually, in the pipe aws-s3-deploy pipe we are using sync aws cli command with this flag.

As I see AWS cli sync does not accept such an argument that you would like to use in EXTRA_ARGS since this is quite specific case.

<https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html>

But you can still remove not needed files with your command in after-script section


Tags: aws

bitbucket-pipelines

server
How I get my bitbucket account single link (URL) ?
Asked by seema kumari:

I want one single link for all my repositories . I don't want to take url of only one respository, I want to take one common link for all. Please help me ??


Answers:
author: Tyler T
body: Try this page: <https://bitbucket.org/dashboard/repositories>


author: Mikael Sandberg
body: Hi [@seema kumari](/t5/user/viewprofilepage/user-id/4072600),

Welcome to Atlassian Community!

I think a bit more information is needed in order to help you. Are you looking to only use one URL to clone all your repositories? Or are you looking for one URL that will show you all your repositories in Bitbucket?

comments: author: Seema Kumari
body: Thanks alot for helping me .Actully I am looking for one URL that will show me all repositories in Bitbucket.

Thanks in advanc for your feedback.


author: Mikael Sandberg
body: Okay, if you go to [Repositories](https://bitbucket.org/dashboard/repositories) you should be able to see all the repositories that you have created or are watching. Bitbucket also introduced [Workspaces](https://bitbucket.org/blog/introducing-workspaces) earlier this year that you use to list all your repositories. Please note that this only applies to Bitbucket Cloud.
File modification time in pipeline
Asked by bigferumdron:

Hi everybody.

When files are mounted in docker container which is run during bitbucket pipeline performing, their last file modification time is changed (it is set as the execution time of the pipeline script)

Why is this happening?

Some of my script depends of file modification time. For example in my pipeline I run compressing resources of my framework, and push them back to repository if need, and the name of the folder where they publish, depends of file modification time of these resources.


Answers:
author: Theodora Boudale
body: Hello and welcome to the community!

When you run a build in Pipelines, the repository is cloned in the Docker container that starts.

The file modification time is something set by Git. You will see the same behavior if you e.g. clone a repository in your computer, the modification time for the files is going to be the time that you made the clone.

This is an intentional decision by the Git team and is addressed in the following question:

<https://git.wiki.kernel.org/index.php/GitFaq#Why_isn.27t_Git_preserving_modification_time_on_files.3F>

Kind regards,  
Theodora


Tags: bitbucket-pipelines

atl-pipelines

bitbucket-cloud

cloud
Create a Bitbucket Project does nothing
Asked by Keith Lyon:

I am trying to create a new Project, inside Bitbucket, (<https://bitbucket.org/account/projects/create>)  

I can enter the information, press the "Create project" button, and nothing happens.  

Looking at the network tab in chrome, i do see it getting a 200 post response from <https://bitbucket.org/account/projects/create>  

However the page does not change, no confirm or error message, and going back to the list of projects i have, shows only the original 2 projects i have created, not the new one.  

I am the sole use of jira and bitbucket.

I have tried this in Chrome Incognito mode, and the same thing happens  

Is it a permissions issue? bug?  

<br />

**A way to get around it is**

if I goto *<https://bitbucket.org/repo/create?owner=>*

<br />

to create a new repo, and then in "Select Project" dropdown, i choose "Create new project", I can create a new project and the repo is added to it.  

This is the only way i can create a new project


Answers:
author: Ove Andersen
body: I experience the same in Brave browser (with all cookies allowed). Nothing happens when creating "Create project".

Seems like others are having issues too <https://community.atlassian.com/t5/Jira-Core-questions/Create-Project-Page-Buttons-Do-Nothing/qaq-p/1471208>


Tags: bitbucket-cloud

cloud
REST API to fetch Jira issue id of a particular commit in bitbucket sever
Asked by sagar udgir:

Is there a REST API to fetch Jira issue id of a particular Commit in Bitbucket sever , giving input as Commit ID.

However following REST Resources Provided By: Bitbucket Server - JIRA Integration

Retrieves , JIRA issue keys that are associated with the commits in the specified pull request. As mentioned in , <https://docs.atlassian.com/bitbucket-server/rest/5.2.2/bitbucket-jira-rest.html#idm45810156392688>

### /rest/jira/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/issues. {#toc-hId-1173934577}


Answers:
author: sagar udgir
body: Got My answer.

JIRA issue id is part of same JSON , which is returned from bitbucket server for any particular commit. Preconditions are,

* There should a valid connection between JIRA and Bitbucket established
* A commit message should contain JIRA ID

Look for **jira -key**


Tags: bitbucket-server

jira-software

server
Is there a way to use a separate pipeline for my Fork?
Asked by Phillip Demro:

I have forked a project which contains a bitbucket-pipelines.yml file.

I would like to create my own separate pipeline for this project (and also be able to issue pull requests)

Is there a way to have a separate bitbucket-pipelines.yml exclusive to my fork?


Answers:
author: Phillip Demro
body: Per [@ktomk](/t5/user/viewprofilepage/user-id/3678912) the TL;DR answer is **no, this isn't possible**


author: ktomk
body: First of all the bitbucket-pipelines.yml file is always exclusive to your fork.

Do you want to issue pull requests with or without your own separate pipeline?

If you want to issue pull requests with your own separate pipeline, (re-) define the pull-request pipeline in your fork.

If you want to issue pull requests without your own separate pipeline, do **not** (re-) define the pull-request pipeline in your fork.

If you don't want to populate your bitbucket-pipelines.yml changes back to the upstream project you forked from, do not file any of the file changes when you create a pull-request upstream.

comments: author: Phillip Demro
body: Thanks for the answer [@ktomk](/t5/user/viewprofilepage/user-id/3678912)! GitHub and Azure Devops both offer the capabilities to have multiple pipelines per project with different triggers. It is unfortunate that BitBucket makes this so restrictive, but I guess this is the only answer. Thanks again.


author: ktomk
body: [@Phillip Demro](/t5/user/viewprofilepage/user-id/4069707) Yes, but keep in mind it's in the eye of the beholder. What is the ones restriction is another persons possibility. In short it was not entirely clear to me from your question what you're looking for specifically. E.g. as you're concerned about a fork if I got that right, it is technically another project.

And then yes again: Bitbucket feels weak at forks + pull requests upstream to me, too.

However take any limitation with a grain of salt: they can turn out things to the better. Just saying.

(btw. didn't know it's possible to accept two answers, fair point)


Tags: bitbucket-pipelines

cloud

pull-request
Pull requests contains all commits for a branch
Asked by amit_kumar05:

Hi,

we are using Bit bucket cloud where repository ABC is subdivided into multiple Folders Say folder 1 and Folder 2 and Branch X and Y is created.

When we create a pull request from folder1 in Branch X to push to Branch Y with same folder 1. Pull request basically contains commits for other Users who is working on folder2 which we do not want to merge or commit. Please suggest how to selectively push Folder1 change to Branch Y and ignore other folder 2 related commit from pull requests coming along to it.

Thanks and Regards

Amit


Answers:
author: Mikael Sandberg
body: That is expected behavior, Git do not differentiate between commits make to a specific path, it will merge all commits made on a specific branch to another. If you do not want to break out each folder as its own repository you could use [Git cherry-pick](https://www.atlassian.com/git/tutorials/cherry-pick) to merge specific commits, but then you will loose the pull request process part in Bitbucket.

I would recommend that you take a look at maybe using [Git subtree](https://www.atlassian.com/git/tutorials/git-subtree), that allows you to have folder A, B etc as separate repositories that you can then bring into your main repository.

comments: author: amit_kumar05
body: Hi Mikael,

Thank you very much. I think Git Cherry pick would work for me If as a reviewer I can selectively approve the commit and merge it in Bit bucket ( similar to cherry pick using Source tree). Cant we still tell developer to create pull request and as a reviewer I can cherry pick and merge specific commit which is relevant for approver. Please suggest if that is possible. Which privilege I should have to do it in Bit bucket.

Thanks and Regards

Amit


Tags: cloud

commit

pull-request
How can I backup my Bitbucket Cloud settings in the Bitbucket database in the Cloud?
Asked by Mark Rooijakkers:

How can I backup my Bitbucket Cloud settings in the Bitbucket database in the Cloud?

Is there a way to use the Backup client against our bitbucket Cloud environment? Or is there another way to backup all my settings, users, projects, repository variables etc. etc. in Bitbucket Cloud database?


Answers:
author: Ana Retamal
body: Hi Mark!

The backup client you're referencing is meant for our Server platform. As a Cloud user you won't be able to use it as you don't have an infrastructure to run it on.

Regarding Bitbucket Cloud, it's not possible to create a backup of its settings, users, or any metadata in general. As for code and repositories, since you're using a distributed system (Git) your local copy would already work as a backup. Keep in mind that every clone of the repo is indeed a backup (although might not always be up to date), so if you want to be sure, you could clone your repositories to another location and use it as your backup.

You'll also find this response from Robert Massaioli very interesting:

* [How to backup the Bitbucket on cloud](https://community.atlassian.com/t5/Bitbucket-questions/How-to-backup-the-Bitbucket-on-cloud/qaq-p/428076#:~:text=Bitbucket%20Cloud%20is%20backed%20up,locations%20to%20back%20it%20up.?)

From our side, we keep backups of Bitbucket Cloud repositories but they're for disaster recovery only, so please make sure you have your own copies. You can learn more about our backups at [Does Bitbucket backup my repositories?](https://support.atlassian.com/bitbucket-cloud/docs/does-bitbucket-backup-my-repositories/)

Hope that answers your question, Mark! If you need anything else, please let us know.

Best regards,

Ana

comments: author: Mark Rooijakkers
body: Hi Ana,

Thank you for the info you provided.

I have just voted this request: <https://jira.atlassian.com/browse/BCLOUD-19832>

And hope this will become available in the near future.

Kind regards,

Mark Rooijakkers


author: Nic Brough -Adaptavist-
body: What backup client are you asking about here?

comments: author: Mark Rooijakkers
body: [https://marketplace.atlassian.com/apps/1211500/bitbucket-server-backup-client?hosting=server\&tab=overview](https://marketplace.atlassian.com/apps/1211500/bitbucket-server-backup-client?hosting=server&tab=overview)


Tags: backup

bitbucket-cloud

cloud
How to revoke a user from a bitbucket workspace
Asked by Murali Bhattar:

How do we revoke users from the Workspace/Members . We have few members who are no longer working with us, currently, we have removed them from the groups but we are not able to remove it under Workspace/Members.


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

You can administer your users on the 'Users on plan' page at [https://bitbucket.org/\<workspaceID\>/workspace/settings/plan-users](https://bitbucket.org/<workspaceID>/workspace/settings/plan-users), remember to replace \<workspaceID\> by the actual ID of your workspace. There you'll be able to find users with access to any of the repositories in the workspace, and you'll also be able to delete them by pressing the X on their right.

Hope that helps you :) If you need any further assistance, please let us know.

Best regards,

Ana

comments: author: Murali Bhattar
body: Thanks Ana. It did worked.


Tags: bitbucket-cloud

cloud
Is there a way to get the # of lines of code in a repository? In the entire Team Bitbucket?
Asked by Monica Gordillo:

Is there a way to get the # of lines of code in a repository? In the entire Team Bitbucket?

I'm looking for a solution for Bitbucket Cloud.


Answers:
author: Ana Retamal
body: Hi Monica!

I've checked our issue tracker and seems like there's already a Feature request for that, you can find it at [BCLOUD-20226](https://jira.atlassian.com/browse/BCLOUD-20226).

Please vote for it to show your interest, I've already added this post internally :) Feel free to write a comment if you'd lite to add any additional information. If you need help with anything else, let us know!

Best regards,

Ana

comments: author: Monica Gordillo
body: Thanks, I voted for it.


Tags: bitbucket-cloud

cloud
want to a token, but not able to find profile picture etc options
Asked by NAGA TEJA ALLA:

Hi Team,

Want to get access to the pyATS scripts.

Write some new scripts. So trying to access it.

Want to create a token for it.

There is no profile picture --\> option where I had to enter and create a new token.

Kindly do the needful.

Thanks \& Regards,

NagaTeja.


Answers:
author: Nic Brough -Adaptavist-
body: You will need to talk to your administrators about this - we have less knowledge or access to your Bitbucket system than you do.


Tags: bitbucket-cloud

cloud
Block merge button while build is in progress
Asked by Serg:

Hi. Tell me please, is it possible to create merge check for blocking Merge button while some build is running? I need to do it while 'Make release' is running on TC attached to current Bitbucket project. So I can't use 'Minimum number of successful builds' for it - no matter what result of 'Make release' would be, I'm interesting only in its running period.


Answers:
author: Tyler T
body: HI [@Serg](/t5/user/viewprofilepage/user-id/4070446) and welcome to the Community!

With a premium plan, you can enforce merge checks. Here is some documentation: <https://support.atlassian.com/bitbucket-cloud/docs/suggest-or-require-checks-before-a-merge/>
Getting error 401 unauthorized while getting list of repos from team
Asked by FLoureiro:

Hello everyone,

I had a funcional script (python 3) doing dailly backups of all repos from a team, and since 2020-08-28 it stops working, and while I was trying to see where was the issue, by changing username to email and even changing password from my atlassian account, I start received error 401 while obtaining the list of repos from the team through that script. I tried with both username and email but same outcome:
> response\> \<Response \[401\]\>

Here is the url that I am using, with login:

```
import requests

# Request 100 repositories per page (and only their slugs), and the next page URL
next_page_url = 'https://api.bitbucket.org/2.0/repositories/%s?pagelen=100&fields=next,values.slug' %team
#print ('next_page_url> \n%s'%next_page_url)

# Keep fetching pages while there's a page to fetch
full_repo_list = []

while next_page_url is not None:
response = requests.get(next_page_url, auth=(username, password))
print ("response> %s" %response)
page_json = response.json()
print ("page_json> %s" %page_json)

# Parse repositories from the JSON
for repo in page_json['values']:
full_repo_list.append(repo['slug'])

# Get the next page URL, if present
# It will include same query parameters, so no need to append them again
next_page_url = page_json.get('next', None)

# Result length will be equal to `size` returned on any page
print ("Result: \n", len(full_repo_list))
```

I have already recheck the password and its the right one.

I really dont know what and why I am still getting the 401 error.

Anyone?


Answers:
author: Theodora Boudale
body: Hello,

For API calls you need to use username for authentication, the email is used for authentication on the website only.

A few things you can try:

Can you try executing the following on a terminal and see if you get the same response or not? This is to narrow down whether the issue is specific to the script or not.

```
curl -L -X GET --user username:password http://api.bitbucket.org/2.0/repositories/<workspace>/
```

where **username** and **password** replace with the values for your account, and **\<workspace\>** replace with the workspace ID for the team.

Can you try generating an app-password for your account and see if this works for you in the curl command above and also for your script?

You can find the documentation on generating an app-password here:

* <https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/>

Kind regards,  
Theodora


Tags: api

bitbucket-cloud

cloud
Unable to run demo app by Atlassian because of Access issues!
Asked by harshit shah:

<https://bitbucket.org/atlassian/devs-unleashed-forge-app-starter/src/master/?new_user=true>  

For unleash hackathon, this was demo app provided. I followed the instruction and managed to install it on my domain.  

I even tried changing app id via forge register  

Unable to find my app here or anywhere else:

<https://developer.atlassian.com/console/myapps/>  

Added screenshots for better context and reference:  
![Screenshot 2023-01-05 at 1.54.10 AM.png](/t5/image/serverpage/image-id/233086iAD89B08AF77BDB64/image-size/large?v=v2&px=999 "Screenshot 2023-01-05 at 1.54.10 AM.png")![Screenshot 2023-01-05 at 1.54.18 AM.png](/t5/image/serverpage/image-id/233085i64E7FD4E07FDE4A8/image-size/large?v=v2&px=999 "Screenshot 2023-01-05 at 1.54.18 AM.png")![Screenshot 2023-01-05 at 1.57.56 AM.png](/t5/image/serverpage/image-id/233087i75B7250F3B925FD9/image-size/large?v=v2&px=999 "Screenshot 2023-01-05 at 1.57.56 AM.png")  


Answers:
author: harshit shah
body: Resolved it.  

Not sure but make sure that you're logged in into console via same email id as confluence account and it should work.   

I will figure out sharing \& editing access -- and will update the answer here!


Tags: cloud

confluence-cloud
Copy placeholder text
Asked by Mick Szucs:

Hi all,

I have a confluence template that makes extensive use of placeholder text, and I want to provide a sample document that makes the placeholder text visible.

It seems like copying placeholder text into a new document inserts it as another placeholder, which makes it invisible on the published document.

Is there any way to "convert" placeholder text into visible text, or do I have to re-type everything into the new doc?

Thanks!


Answers:
author: Alex Koxaras _Relational_
body: Hi [@Mick Szucs](/t5/user/viewprofilepage/user-id/4601843)

No, I don't think there is something you can do about it unfortunately. I mean you can't convert it. Currently you can't even select it. :/

See this post [https://community.atlassian.com/t5/Confluence-questions/How-do-I-edit-instructional-text-in-the-new-editor/qaq-p/1309370#:\~:text=Clicking%20the%20bookmarklet%20once%20on,it%20copied%20to%20your%20clipboard](https://community.atlassian.com/t5/Confluence-questions/How-do-I-edit-instructional-text-in-the-new-editor/qaq-p/1309370#:~:text=Clicking%20the%20bookmarklet%20once%20on,it%20copied%20to%20your%20clipboard).

As well as this suggestion <https://jira.atlassian.com/browse/CONFCLOUD-67333>

comments: author: Mick Szucs
body: Thank-you, Alex.

I ended up just copying the placeholder text to a Word doc and then re-pasting into my Confluence doc, which was tedious, but did the job.


Tags: cloud

confluence-cloud