youngmon/atlassian-qna huggingface dataset:
Branch permission for all repositories
Asked by tw_ntc_tpkd:

I am subscribing premium plan for bitbucket. How can I set branch permission for all the repositories under a project? I have followed the article from <https://confluence.atlassian.com/bitbucketserver/using-branch-permissions-776639807.html>, but there was no branch permissions in the project setting.


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

The documentation you linked is applicable for Bitbucket Server (self-hosted instances), I'm afraid this feature is not available in Bitbucket Cloud yet. At the moment, branch permissions must be set on a per-repository basis in Bitbucket Cloud.

We have a feature request for what you are asking in our issue tracker:

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

I would suggest that you add your vote in the feature request (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Pipeline scheduled to run at 6:30 PM EST, but running at 6:47PM EST
Asked by Subit Das (Temp):

I have a pipeline scheduled at 4:00 AM IST i.e. 6:30 PM EST  
But it's running at 6:47 PM EST.  
Why is it so ?  
Please refer the attached images for more infos.

![11.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/157176i8025752AEDCC466D/image-size/large?v=v2&px=999 "11.JPG")


Answers:
author: Theodora Boudale
body: Hi [@Subit Das (Temp)](/t5/user/viewprofilepage/user-id/4045331),

When creating a weekly or daily schedule you can select a time period of one hour for the pipeline to run, as you can see in the screenshot below:

![Screenshot 2021-08-25 at 13.52.25.png](https://community.atlassian.com/t5/image/serverpage/image-id/157475i7E1E42FA7B886B28/image-dimensions/469x326?v=v2 "Screenshot 2021-08-25 at 13.52.25.png")

It is not possible to set a specific time. The time shown in the screenshot you attached (Every day at \~4am) is the starting time of the 1-hour time period that was set when creating the schedule.

The scheduled pipeline can run at any time in the selected time period. This is to distribute all schedules in Pipelines triggering across the hour.

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Authenticate Bitbucket in VSCode over SSH
Asked by sandip:

Hi,

I'm working on a remote codebase with VS Code and I need to authenticate Bitbucket and JIRA over SSH. However VS Code tells me that Authentication cannot be done while running remotely.

Access the device locally is not an option.

Is there a way around to this problem?

Thanks,  
Sandip


Answers:
author: Theodora Boudale
body: Hi Sandip,

I assume that you're using Atlassian for VS Code extension? If so, I'm afraid that there is no way around this issue, we don't support authentication remotely.

There is a feature request to support this in the issue tracker for this extension, you can vote for it and add yourself as a watcher if you'd like to get notified on any updates:

* <https://bitbucket.org/atlassianlabs/atlascode/issues/584/cant-login-into-my-jira-cloud>

Kind regards,  
Theodora


author: kai tian
body: "I have encountered the same issue. When will it be supported? Thank you."


author: jwright
body: I have the same problem. Is there any update on this?

(I'm denied access to the issue link)

Thank you.

comments: author: Theodora Boudale
body: Hi [@jwright](/t5/user/viewprofilepage/user-id/3540298)

This feature hasn't been implemented yet, so I'm afraid it is not possible to authenticate remotely.

The issue I posted is public, what kind of error do you see when you try to access it?

Kind regards,  
Theodora


author: jwright
body: The workaround is to authenticate to Bitbucket locally in VSCode before connecting to the remote host.

(Issue link is working now.)


Tags: atlassian-support

authentication

bitbucket-cloud

cloud

remote

ssh
How do i get commits from all Projects ?
Asked by BIBO:

I would like to get the count for commits on all all projects


Answers:
author: Kevin Johnson
body: Hi [@BIBO](/t5/user/viewprofilepage/user-id/4526006) ,

You can use [Awesome Graphs for Bitbucket](https://marketplace.atlassian.com/apps/1210934/awesome-graphs-for-bitbucket-server?hosting=server&tab=overview&utm_source=stiltsoft&utm_medium=blog&utm_campaign=graphs-traffic-sources&utm_vendorID=27437&utm_content=how-to-search-for-commits-in-bitbucket-server-and-data-center-start) plugin for

* projects and repositories in your Bitbucket that a certain user-contributed to (filter by author)
* commits that were made long ago to a repository with high activity (filter by time)
* the commits of a user made to a repository or project (filter by author and project/repo)
* all the commits made to a project (filter by project).

Hope this helps.

Regards,

Kevin.

comments: author: Anastasia Voronova
body: Hi there,

[@Kevin Johnson](/t5/user/viewprofilepage/user-id/3412827) thank you for mentioning our app :)

[@BIBO](/t5/user/viewprofilepage/user-id/4526006) If you need total number of commits on your instance, the easiest way to do it is to use the [following query](https://docs.stiltsoft.com/awesome-graphs/data-center-and-server/export-and-integrations/rest-api/getting-commits-and-pull-requests-via-rest-api#GettingcommitsandpullrequestsviaRESTAPI-Statistics)

Please, let me know if this works for you.

Thanks,  
Anastasia


Tags: bitbucket-server

server
Execute the pipeline even with runner offline
Asked by Fernando Muller:

Hi, good morning.  
There is a way to execute a pipeline in Bitbucket even the self hosted runner is offline, using the runner of Bitbucket Cloud?


Answers:
author: Syahrul
body: Hi [@Fernando Muller](/t5/user/viewprofilepage/user-id/4520787)

Welcome to the community!

Currently, pipeline build will fail automatically when the build is unable to communicate with the runner and we don't have a failover that will let the build run on the Bitbucket pipeline when this happens. Unless you manually remove the runs-on: in YAML to let Bitbucket pipeline know that you are not using runner anymore.

I like your idea of having a failover when a runner is offline to run on the Bitbucket pipeline so I have proceeded to raise a feature request on behalf of you at:

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

I highly suggest you **Vote \& Watch** the feature request so that you'll receive an update whenever we have any.

I hope this helps

Cheers,  
Syahrul


Tags: bitbucket-pipelines

cloud
Use local devices on self hosted runners
Asked by Thomas Augustin:

Hello,

I am kind of new to docker and and to self-hosted runners in bitbucket as well.

I am trying to access a local USB device via a self hosted pipeline runner on a local host PC.

It tried to add

```
-t -i --device=/dev/ttyUSB0:/dev/ttyUSB0
```

to the command to start the local runner on the host PC.

And I also tried to added the devices in the .yml file in bitbucket like:

```
image: ubuntu

devices:
  - "/dev/ttyUSB0:/dev/ttyUSB0"

pipelines:
  default:
    - step:
        name: Run unittests on local host
        runs-on:
          - 'self.hosted'
        script:
          - echo "This step will run on a self hosted runner.";
          - ls /dev/
```

Unfortunately, I am not able to see the USB devices either way.

Is it possible to access or connect to the local USB devices?

If it is possible, how should I do it?


Answers:
author: Michael Wurm
body: +1 for that!

I would really like to see this feature too!

Simply allowing the 'privileged mode' for the Docker image would resolve any issues.

This feature was already requested here: <https://jira.atlassian.com/browse/BCLOUD-13420>

Back then, the privileged mode was not supported, because of security reasons.

However, now that local self-hosted runners are available, it should be one's own decision to run the pipeline in privileged mode!

A common use case that requires access to local USB devices:  
Development and testing of an embedded device.  
Using a programmer to flash i.e. a microcontroller is almost always done through USB!

comments: author: Thomas Augustin
body: Thanks for the kind answer,

I realized in the meantime, that both ways are not working because when I start the local runner by

```
-t -i --device=/dev/ttyUSB0:/dev/ttyUSB0
```

it only starts the runner with that the usb devices however not the container which is started by the runner.

And the other way does not work because bitbucket pipeline does support that option.

I solved that issue by using ssh to access the local host pc via the pipeline container and from there I have access to the USB devices. Feels like a detour, but at least I can use the pipeline now to test the embedded device.


author: Jarek Piotrowiak
body: +1 from me. I could really use this feature for testing embedded system


author: Jarek Piotrowiak
body: I created <https://jira.atlassian.com/browse/BCLOUD-21589>


author: Andreas Pettersson
body: There seems to still be no way to do this, and I would really like it to be able to use USB devices to test my embedded units.

+1 for any solution to this.


author: Th?o Meyer
body: Device access or even full host access (file system + device) would open an important amount of possibility for automation of test on real devices.

[@Thomas Augustin](/t5/user/viewprofilepage/user-id/2930997) how did you achieve that using SSH? You ssh from the docker to the runner host ?


Tags: bitbucket-pipelines
Link repository, what password?
Asked by Everlong Everlong:

I'm trying out Bitbucket for the first time. Currently I'm following a tutorial for Django, but the info seem to a bit outdated. So I'm following [this tutorial](https://support.atlassian.com/bitbucket-cloud/docs/copy-your-git-repository-and-add-files/)as an example.  

So I got my project and git. Now I like to backup my project on Bitbucket. I've setup a account on Bitbucket (by linking my gmail account) and created my first repository.

After cloning my repository inside the terminal (Linux) I need to enter a password. I'm not sure, but this is the password I use to login to my Bitbucket account, right? Or is there some secret git password I need to enter. I also created and tried the app passwords on Bitbucket, but I'm not sure if it's meant to link the repository.

Right know I'm getting the error:  

remote: Too many invalid password attempts. Log in at <https://id.atlassian.com/> to restore access.  
fatal: unable to access '<https://bitbucket.org/Uses/Reositrory.git/>': The requested URL returned error: 403  

If I go to the id.atlassian.com, but I'm not sure what I have to do to fix the mess I made  

<br />

<br />

<br />

<br />


Answers:
author: Kevin Johnson
body: Hi Everlong

This is what I found !!!

"8. Enter your Bitbucket password when the terminal asks for it. If you created an account by linking to Google, use your password for that account."

Linking the latest document for your reference. Hope this helps.

[https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud](https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud?)

Cheers,

Kevin.


Tags: bitbucket-cloud

password

repository
aws-cloudformation-deploy:0.10.0 doesn't handle no updates to stack gracefully
Asked by Jeff T:

BitBucket Cloud Pipelines

aws-cloudformation-deploy Pipe version 0.10.0

TLDR; If a stack is in UPDATE_ROLLBACK_COMPLETE state and the next pipeline running against that stack results in "No updates are to be performed for stack", the pipe fails because stack state isn't UPDATE_COMPLETE

The scenario that occurred:

1. A change was erroneously committed to the CloudFormation template which broke the AWS deployment
2. AWS failed to deploy and rolled back, causing the pipeline to fail (GOOD)
3. The change was rolled back to original form and committed, pipeline reruns
4. Pipeline fails as it runs this Pipe because there are no changes to be made in AWS (template and params are same as current state) but pipe fails because final state is not what it expects - UPDATE_COMPLETE

Expected:

It's expected that the PIPE can detect when no changes are needed and treat that as a success regardless of the CloudFormation stack. This is how the AWS stack update process works and stack state changes only occur when changes are actually made.

Log:

    Digest: sha256:24ad7558d24c7ce4bd5bf42272cd4a0b269248c7ac188277fbd314a337eb461d

    Status: Downloaded newer image for bitbucketpipelines/aws-cloudformation-deploy:0.10.0

    INFO: Using default authentication with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

    INFO: Found credentials in environment variables.

    INFO: Using stack template from ./deploy.yml for deploy.

    INFO: Validating the template.

    INFO: Updating the stack for STACKNAME_IN_UPDATE_ROLLBACK_COMPLETE.

    WARNING: No updates are to be performed for stack STACKNAME_IN_UPDATE_ROLLBACK_COMPLETE.

    INFO: Waiting for update COMPLETE status...

    ? Failed to update the stack. Status UPDATE_ROLLBACK_COMPLETE.


Answers:
author: Oleksandr Kyrdan
body: Hi [@Jeff Taylor](/t5/user/viewprofilepage/user-id/243134)

Thank you for your suggestion.

We'll investigate this case and notify you.

Best regards,  
Oleksandr Kyrdan


Tags: aws

bitbucket-pipelines

cloud
ERR_HTTP2_PROTOCOL_ERROR whenever i try to access the site via Facebook shared link
Asked by nowhash:

Hi,  
I deployed my site on bitbucket.  
Whenever I shared the bitbucket.io link on Facebook and try to access it directly via from Facebook, I encountered this error:

The webpage at **<https://nowhash.bitbucket.io/?fbclid=IwAR3xEQ6-7Kak1pvkL1TKV_cbyZBxuaQfFY8Mipo5PKKDzong4pNPvDDm47g>** might be temporarily down or it may have moved permanently to a new web address.  
ERR_HTTP2_PROTOCOL_ERROR  
I tried to figure it out using Facebook debugger but didn't find any specific error.  
Can anyone help me in this regards?


Answers:
author: Nic Brough -Adaptavist-
body: You'll need to get Facebook to stop adding all the junk parameters from the ? onwards. They're useless to bitbucket and are misdirecting your browser to the wrong place.


Tags: bitbucket-cloud

cloud
How to make the parent git folder always point to latest commit whenever there is a new commit in ch
Asked by BALA KRISHNA CHERUKURI:

Every time I push a commit to the submodule I need to update the parent repo to the latest commit in the submodule. Is there any automatic way to do that in the remote?

Every time push a commit in the submodule repo I want the parent to automatically point to the latest commit of the child repo. Please suggest if it's possible and how?


Answers:
author: Mark C
body: Hi [@BALA KRISHNA CHERUKURI](/t5/user/viewprofilepage/user-id/4524483)

Welcome to the community.

Right now, I'm afraid there's no feature in Bitbucket Cloud to automatically update your parent repository with a submodule.

As a workaround, you can achieve this by using [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines).  
The idea is to trigger a Pipelines build in your submodule repository that will update your parent repository to the latest commit in the submodule.  
This way, there's no need for you to manually update your parent repository.

You can also check out the below existing community posts that might help:

* <https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/How-to-use-git-submodule-init-property/qaq-p/1778195>
* <https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-Pipelines-and-git-submodules/qaq-p/130479>

Hope it helps and let me know if you have further questions that I can help with.

Regards,  
Mark C

comments: author: Brian Kidmose Andersen
body: Hi Mark,

you wrote: "The idea is to trigger a Pipelines build in your submodule repository that will update your parent repository to the latest commit in the submodule."

How to do this excactly?

br,brian


Tags: bitbucket-cloud

cloud

submodule
Maven cannot authenticate to Bitbucket to download artifacts from private repo
Asked by Bytor:

I have a private Maven repo in my BitBucket account that I had been using for years until I let that project slide. I wanted to do more work on it but I found that the 1.0 API had changed. I figured out the new 2.0 API URL but now Maven will not connect.

```
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.014 s
[INFO] Finished at: 2021-08-20T17:31:34-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project hanfastolfe-accounts: Could not resolve dependencies for project com.hanfastolfe:hanfastolfe-accounts:jar:2.1.0-alpha: Failed to collect dependencies at com.hanfastolfe:hanfastolfe-misc:jar:1.0.0: Failed to read artifact descriptor for com.hanfastolfe:hanfastolfe-misc:jar:1.0.0: Could not transfer artifact com.hanfastolfe:hanfastolfe-misc:pom:1.0.0 from/to han_fastolfe_maven_repository_releases (https://api.bitbucket.org/2.0/repositories/Bytor/maven_repository/src/releases): Authorization failed for https://api.bitbucket.org/2.0/repositories/Bytor/maven_repository/src/releases/com/hanfastolfe/hanfastolfe-misc/1.0.0/hanfastolfe-misc-1.0.0.pom 403 Forbidden -> [Help 1]
```

I have verified that with curl -u ... I can download the files using the same credentials set in my \~/.m2/settings.xml file for Maven.

What do I need to do to make sure that Maven can once again download artifacts?


Answers:
author: Mark C
body: Hi [@Bytor](/t5/user/viewprofilepage/user-id/2607346)

Thank you for reaching out to the community.

Would it be possible for you to confirm how you're using the credentials from **\~/.m2/settings.xml** ?  
Are you currently using environment variables?

You can also try to do a Curl command before your build command to see if Curl will also work on Pipelines or not.

Apart from that, I'd also recommend [testing your Pipelines build locally in a Docker container](https://support.atlassian.com/bitbucket-cloud/docs/debug-pipelines-locally-with-docker/) to compare if it works there or not.  
Ideally, if it works locally in a Docker container, it should also work on Pipelines.

Let me know how it goes.

Regards,  
Mark C


Tags: bitbucket-cloud

cloud

maven
Hide branch close commits from hg flow
Asked by Helge S?derstr?m:

Hi!

We're using SourceTree with Mercurial to great satisfaction for our development, but there's one thing annoying me, which I wonder if it's configurable.

Problem:  
If a developer has worked on a branch, completed the feature / change, merged into default (which is our release branch) and closed their working branch, there's this final dot in the flow showing that closing commit.

Desired solution:  
I'd like the line merging the branch flow with the default branch line to be the final one, instead of having that branch close dot staying just above the line merging the two branches. Is this possible?

I hope I made sense there...

Thanks for great work, Atlassian.

// dim


Answers:
author: KieranA
body: Hi Helge,

Thanks for the input. Closing branches can be confusing when it comes to looking at the graph. The graph reflects what has actually happened in terms of commits/merges/branches and so we maintain what's true to what Mercurial reports in the log. If you check out the [Mercurial docs](http://mercurial.selenic.com/wiki/PruningDeadBranches) on closing a branch it states "This creates a closing changeset which typically contains no modifications to tracked files." So true to Mercurial, there is a merge commit *and* a close commit which can't be done in one go. There's two options in your case:

1. Leave the branch open and let it become inactive (of course the branch will still technically be open though)
2. Close your branch first, and *then* do your merge commit. This seems wrong, but for your case would be the only other option.

We wouldn't really mess with the log view to reflect something which isn't true, unfortunately Mercurial doesn't let you do a merge commit whilst closing the branch in one go.

Hope that helps

comments: author: Helge S?derstr?m
body: Hey, Kieran, and thanks for your answer. Yeah, it's good that SourceTree reflects the actual goings-on in Mercurial, so I'm with you there. On the next branch, I'll try closing it before and see how it looks.

Thanks!
Is it possible to use SourceTree as a diff tool?
Asked by David Rees:

Is it possible to use SourceTree as a regular diff tool? I really prefer the way it only shows the changes with context (like a patch).


Answers:
author: stevestreeting
body: If you mean for diffing things other than hg / git changes or commits, like just giving it two files, I'm afraid not. SourceTree gets the diffs from hg/git and then parses the output into a format it can render in the way you see.

comments: author: David Rees
body: Understandable, but a bummer...
error on intial pull
Asked by Edgardo Beltran:

on an initial pull on a branch i am getting this error:

error: The following untracked working tree files would be overwritten by merge:

list of file...


Answers:
author: KieranA
body: Hi Edgardo,

This means that you have a file in your working copy that is untracked which also exists as a tracked file in the branch you're just about to merge. In your case Git doesn't know what to do as it doesn't want to overwrite files you might need. Your options are:

1. Delete the file which is causing the merge error if you don't need it
2. Rename it if you don't want to merge it with any other files from the merge
3. Commit it in your working copy so you can merge it later

Basically, Git doesn't like to delete files unnecessarily so will want you to address the problem yourself before doing the merge. The error message does tell you which files are causing the problem so this should be pretty easy to fix.

Hope that helps, feel free to ask more questions if needed.
Stash Host URL
Asked by Steve Floyd:

Hello, I just set up stash on a server and have it working via the URL. I am trying to enter said address into SourceTree, but it says "Bad Host URL: The Host URL you specified appears to be malformed, please correct it."

What is supposed to go into this field?


Answers:
author: stevestreeting
body: This should be the root URL of your Stash system, not including any project or user paths.


author: EddieW
body: Are you specifying the root url to the stash application or a particular repository? Are you including a protocol in the URL? Providing these additional details or an example URL should make it easier to get a proper answer.