youngmon/atlassian-qna huggingface dataset:
git clone hangs in Bamboo using Stash
Asked by andersheintz:

I'm trying to setup a build plan using Stash as repository. I recently upgraded to the latest versions of Stash and Bamboo to enable the new version of application linking and I have linked the applications together and the links seems to work fine except that the build hangs indefinitely on "Checking out revision.

git clone works fine on the bamboo server over https as well ssh using my own username and ssh key.

I cannot see any errors in the logs and there is no firewall between the bamboo and stash servers. I have decreased the command timeout in the shared repository settings to 4 minutes but the build hangs much longer than that.

**Product versions:**

Stash v2.12.2

Bamboo v5.5.0 build 4304

**Build log:**

|----------------------|----------------------------------------------------------------------------------------------------------------|
| 12-May-2014 13:42:55 | Build My App - My App Build Plan - Default Job #3 (CATABI-BIBP-JOB1-3) started building on agent Default Agent |
| 12-May-2014 13:42:55 | Build working directory is /cmdata/bamboohome/xml-data/build-dir/CATABI-BIBP-JOB1                              |
| 12-May-2014 13:42:55 | Executing build My App - My App Build Plan - Default Job #3 (CATABI-BIBP-JOB1-3)                               |
| 12-May-2014 13:42:55 | Starting task 'Checkout Default Repository' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout'       |
| 12-May-2014 13:42:55 | Updating source code to revision: d7cde9db9a6f6b31f1c78052633b2530e81f057c                                     |
| 12-May-2014 13:42:56 | Fetching 'refs/heads/master' from 'ssh://git@vcs.tjanstelogik.se:7999/catabi/myapp.git'.                       |
| 12-May-2014 13:42:56 | Git: Updating references                                                                                       |
| 12-May-2014 13:42:56 | Git:                                                                                                           |
| 12-May-2014 13:42:56 | Checking out revision d7cde9db9a6f6b31f1c78052633b2530e81f057c.                                                |


Answers:
author: Sultan Maiyaki
body: Hi Anders,

Do you have a native git capability configured? If you dont define one, Bamboo uses the bundled jgit which is quite buggy. Try to add a git capability and try again


author: WDKyle
body: I have the same issue, and I have git capabilities set.


author: andersheintz
body: I was using the jgit client, which definitively shouldn't be used (and perhaps not even bundled with the product). Working like a charm with native git!


author: andersheintz
body: Hi,

I'm using OpenJDK 1.7. java -version output:

```
java version "1.7.0_25"OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1~deb7u1)OpenJDK Server VM (build 23.7-b01, mixed mode)
```


author: Timothy
body: What Java version are you using for Bamboo?


Tags: bamboo-administration

bitbucket-server
Embedding iframe/plugin in Bamboo Build Summary?
Asked by perara:

Hello! I was wondering if its possible to embed iframes or similar to the Bamboo Build Summary. What i want is to show a HTML file with the results from the build

Thanks!


Answers:
author: Timothy
body: You should be creating a Bamboo add on to do this for you. Add a web-item ([](https://developer.atlassian.com/display/BAMBOODEV/Web+Item+Module)<https://developer.atlassian.com/display/BAMBOODEV/Web+Item+Module>) that will show whatever content that you want.

comments: author: perara
body: Thank you Timothy!

I will have a look at this :)

Have a nice day!


Tags: bamboo-administration
Git clone operation is very slow
Asked by Rohit Dalvi:

I have recently noticed that after the update of Bitbucket 7.17.4 our bitbucket server has become very slow and the git clone takes forever and builds are failing due to time out. Is there a configuration in Bitbucket which I can tweak to make the git clone operation faster ?


Answers:
author: Evan Slaughter
body: Hi [@Rohit Dalvi](/t5/user/viewprofilepage/user-id/4570869)

Without looking at the logs themselves, the best thing I can think to advise would be to enable profiler logging on your Bitbucket instance, as well as git trace logging on the git client performing the clone, and use those to see where the slowdown is happening. (For more info on how to do that, see: [Bitbucket - Enable debug logging](https://confluence.atlassian.com/bitbucketserver/enable-debug-logging-776640147.html))

Based on what I've seen in the past, the cause for this could be quite a few different things. To name a few:

* Issues with the filesystem such as incorrect NFS settings, poor network connectivity between the Bitbucket NFS server and the Bitbucket nodes, bad read/write speeds or IOPS, etc.
* Issues with the network connection between the Bitbucket node and the git client. (Sometimes caused by things such as using a VPN or some other aspect of the network itself.)
* Issues with resource utilization on the Bitbucket node(s), where a large queue of requests is built up due to having insufficient resources to handle the incoming requests. For more info see: [here](https://confluence.atlassian.com/bitbucketserver/scaling-bitbucket-server-776640073.html) and [here](https://confluence.atlassian.com/bitbucketserver/scaling-bitbucket-server-for-continuous-integration-performance-776640088.html)
* Issues with a reverse-proxy or load balancer in front of your Bitbucket node(s) that's imposing some kind of restriction on the HTTP requests being sent to Bitbucket.

Given the above potential causes, I'd recommend seeing if you can [bypass your reverse proxy](https://confluence.atlassian.com/bitbucketserverkb/how-do-i-bypass-a-proxy-for-bitbucket-server-826878770.html) or that you use a different protocol for cloning (such as SSH) and then see if the slowness persists. If so, it's possibly something server-side such as a filesystem issue. Otherwise, if the issue goes away, it may be something more networking-related.

In either case, if you get stuck and need additional help, feel free to shoot our support team a request with a support zip from your Bitbucket nodes and we'll be happy to help advise further.

Thanks,

Evan Slaughter

Senior Support Engineer \| Atlassian Support - Development Tools


Tags: bitbucket-server

server
Repository size exceeds limit
Asked by Maximilian F:

Hi,

my repository size is over the limit of 4gb. I deleted the branch which caused the issue. The commits were removed but the repo size is still 7.78gb.


Answers:
author: Caroline R
body: Hi, [@Maximilian F](/t5/user/viewprofilepage/user-id/4804235), welcome to the community!

I ran the GC against your repository and managed to reduce its size to 53.5 MB.

I also would like to share with you that we have a feature request to allow users to mark repositories for git GC, as you can check here:

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

Please consider adding yourself as a watcher to receive the updates as we make progress with this. If you are not familiar with our Feature Request Policy, you can read more about it [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html).

Feel free to share any additional questions or concerns regarding this case.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
Getting license is not valid information
Asked by Patrick Vogt:

Hi Atlassian, why do we get this when we enter our on premise <https://bb1.osiv.ch>

**Your license is not valid for this version of Bitbucket.** Users will not be able to push code to repositories hosted on Bitbucket

We explicitly requested this license before the closing of this product to test our deployments and now we are facing this problem. Thanks for checking.

Patrick

<br />

<br />

<br />


Answers:
author: Nic Brough -Adaptavist-
body: Start by checking the basics - look in your Atlassian account (the one that "owns" the licence" and check the end date on the current licence.

Then go into Bitbucket -\> Admin -\> Licence and check that the licence key there matches what you have in your account. Also make note of the Bitbucket version.

Finally, check <https://bitbucket.org/product/download-archives> for your version of Bitbucket and if the release date is before or after the end date on the active licence.

comments: author: Patrick Vogt
body: Indeed, the newly assigned license wasn't applied. Thanks for your help!

But the error message was misleading :-(


Tags: bitbucket-server

server
BitBucket CODEOWNERS support for paths with spaces inside?
Asked by Vladimir Mikhailov:

Can you help me with BitBucket CODEOWNERS plugin and how can it support paths with spaces inside?


Answers:
author: Michael R?egg _Mibex Software_
body: You can just put paths with spaces inside double quotes:

```
# When your glob expression contains spaces, put the glob into double quotes.
"a/path with spaces/*" @AnnTheScalaPro
```

Hope this helps.


Tags: app

bitbucket-server

server
How can I enable "Delete branch after the pull request is merged" by default?
Asked by Zejia Chen:

As title. Setting per repo is enough. I would like to let all pull requests of this repo have this ticked. Our repo is hosted in Bitbucket Cloud. Thanks!


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Zejia Chen](/t5/user/viewprofilepage/user-id/4803908) ,

welcome to the Atlassian community!

Usually, this setup is per user basis. As a user, if you choose to delete branch after merge in repository, on next merge the checkbox will be checked.

Btw, there's an open request to make this setting as default per all users. You can vote and watch this request <https://jira.atlassian.com/browse/BCLOUD-21661> in order to be updated.

Hope this helps,

Fabio

comments: author: Davide Cavestro
body: Hi [@Fabio Racobaldo _Herzum_](/t5/user/viewprofilepage/user-id/781528), could you elaborate on
> Usually, this setup is per user basis. As a user, if you choose to delete branch after merge in repository, on next merge the checkbox will be checked.

I can't see this memory effect at PR creation time, whle at PR merge time I simply see the value previously set by the proposer on the PR.

(in the meantime I voted for the feature request you linked)


author: Saxea _Flowie_
body: In [Flowie](https://flowie.app/), a Bitbucket cloud app for defining workflows that we provide, you can configure it to always, or depending on a condition, [close the source branch](https://flowie.app/docs/en/plugins/merge#restricting-merge-options-and-default-values), so developers don't even need to worry about this.

Flowie is available via the [Atlassian Marketplace](https://marketplace.atlassian.com/apps/1231101/).


author: hectormartos
body: It seems that Bitbucket Server includes a setting to automatically delete the branch after merging, but is not included in Bitbucket Cloud.

This was a concern to our development team, so I developed an [Open-Source extension](https://github.com/hmartos/bitbucket-pull-request-auto-delete-branch) for Google Chrome, which you can install from the [Chrome Web Store](https://chrome.google.com/webstore/detail/bitbucket-pull-request-au/iffllgmebelmfdfiiagjgbpjhplobfem).

I hope it helps!


Tags: bitbucket-cloud

cloud
Source tree Authentication Error
Asked by uzairaslam01:

Hello, I was trying to push my git repository from SourceTree to my account but the the error displays which is showing in attachment ![Screenshot (187).png](https://community.atlassian.com/t5/image/serverpage/image-id/187527iA409E88319019442/image-size/large?v=v2&px=999 "Screenshot (187).png")


Answers:
author: Norbert C
body: Hi [@uzairaslam01](/t5/user/viewprofilepage/user-id/28908)

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!

Based on my observation, you're trying to authenticate your SourceTree client with an account password, but we've deprecated it with March 1, 2022

To resolve this issue, can I ask you to generate an [app password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/)and update your [SourceTree client](https://community.atlassian.com/t5/Sourcetree-articles/Bug-Fix-Sourcetree-for-Windows-authentication-error-when/ba-p/1965968) so that it's using the app password?

Please let us know how it goes.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


Tags: bitbucket-server

server
Can we cache the scp-deploy pipe
Asked by Jarno Dijkstra:

Hello,

We are using the scp-deploy pipe to upload our artifacts to one of our linux servers. In the logs of the pipe we can always see the following snippets:

Unable to find image 'bitbucketpipelines/scp-deploy:1.2.1' locally  
1.2.1: Pulling from bitbucketpipelines/scp-deploy  
Status: Downloaded newer image for bitbucketpipelines/scp-deploy:1.2.1

Is there anyway we can make the image available 'locally' so it does not have to download the scp-deploy pipe every single build? if so how do I do this as its unclear to me. Same question actually for the ssh-run pipe image.

Thanks for any help.

regards,

Jarno


Answers:
author: Ankit Gupta
body: Hi Jarno,

You can add the below to your pipeline step:

```
caches:
   - docker
```

Ref: <https://support.atlassian.com/bitbucket-cloud/docs/cache-dependencies/>

comments: author: Jacob Willig
body: What do we need to add to this section?

```
definitions:
  caches:
```


author: Ankit Gupta
body: No, this needs to be added to the step


author: Fernando Cristan
body: I have the same question, I did the same procedure, but it didn't work.

For the atlassian/scp-deploy:1.2.1 and atlassian/ssh-run:0.4.1 images

Added in the caches of the first step doesn't work and if I add it in the second step it doesn't work either, always with the following error:

"It looks like docker isnt defred as a service ?n this step. You"l need to add that before you car add a dccker cache."

```
image: mcr.microsoft.com/dotnet/sdk:6.0

pipelines:
branches:
dev:
- step:
name: Build
caches:
- dotnetcore
script: 
- dotnet restore "src/LogSistemas.Domynus.Api/LogSistemas.Domynus.Api.csproj"
- dotnet build "src/LogSistemas.Domynus.Api/LogSistemas.Domynus.Api.csproj" -c Release
- dotnet publish "src/LogSistemas.Domynus.Api/LogSistemas.Domynus.Api.csproj" -c Release -o $BITBUCKET_CLONE_DIR/app/publish
artifacts:
- app/publish/**
- step:
name: Deploy to server
deployment: test
script:
- pipe: atlassian/scp-deploy:1.2.1
name: Sending files
caches:
- docker
variables:
USER: $USER
SERVER: $SERVER
REMOTE_PATH: $REMOTE_PATH #Path that you want to copy your files to on the server and must exist prior to running the pipeline
LOCAL_PATH: '${BITBUCKET_CLONE_DIR}/app/publish/*' #Path that has the files we need to copy over. In this case, simply put the relative path to the artifact we produced in the previous step
DEBUG: 'true'
- pipe: atlassian/ssh-run:0.4.1
name: Executing api
variables:
SSH_USER: $USER
SERVER: $SERVER
COMMAND: 'cd ~/domynus/domynus_web_backend2 && dotnet LogSistemas.Domynus.Api.dll' 
DEBUG: 'true'

```


Tags: bitbucket-cloud

cloud

scp
I cannot push to repository because of app password authentication
Asked by 7eventhChux:

Hi, please can anyone help suggest what I can do? I am not able to push to a team repository, I use visual studio code editor. When I try to push it prompts that i provide app password. I tried to create app password following the steps on Atlassian support, but I can't find Personal settings \> Access Management \> App password from my avatar.

This is the message I get when I try to push.

fatal: Invalid credentials  
remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication.  
remote: See our community post for more details: <https://atlassian.community/t5/x/x/ba-p/1948231>  
remote: App passwords are recommended for most use cases and can be created in your Personal settings:  


Answers:
author: 7eventhChux
body: Never mind, I'm good now. Thanks
Pull request decoration is not available in SonarQube enterprise edition with Bitbucket
Asked by sankar sankar:

Pull request decoration is not available in SonarQube enterprise edition with Bitbucket {#toc-hId--1181676747}
--------------------------------------------------------------------------------------------------------------


Answers:
author: sankar sankar
body: Can someone please help me?

![image](https://aws1.discourse-cdn.com/sonarsource/uploads/sscommunity/optimized/3X/5/b/5b0799434d8641477a6cd403acb5e65d9da3f8e1_2_690x470.png)

comments: author: Antonio Calero
body: Of course it is supported.

It is located on DevOps Platform Integrations section.


Tags: bitbucket-server

server
"Admin" group not available in "Branch permission"
Asked by Pankaj Jangid:

I have following group access under a Bitbucket git repository. Note that Administrators groups has all the permissions.

![Screenshot from 2022-03-10 11-11-50.png](https://community.atlassian.com/t5/image/serverpage/image-id/187483i5A3EA65E2A6CDF68/image-size/large?v=v2&px=999 "Screenshot from 2022-03-10 11-11-50.png")

But when I go to "Branch permissions" screen and "Add a branch permission". I don't see "Administrators" group under the "Write access" drop-down. The list has "Everybody" and individual members of the workspace.

![Screenshot from 2022-03-10 11-15-43.png](https://community.atlassian.com/t5/image/serverpage/image-id/187391i6A325106BCE93FE3/image-size/large?v=v2&px=999 "Screenshot from 2022-03-10 11-15-43.png")


Answers:
author: Caroline R
body: Hi, [@Pankaj Jangid](/t5/user/viewprofilepage/user-id/853501), thank you for reaching out to Atlassian Community.

As this Administrator group has admin access over this repository, you should be able to add it to the branch permissions. I tested it and it's working for me, however, I need to start typing the group name to see it in the dropdown.

Could you please confirm if even when typing the group name, you can't see it there? If you can't, this could be a browser issue. In this case, I would ask you to test this in an incognito window using Chrome.

Please let me know how it goes and feel free to share any additional questions regarding this case.

Kind regards,  
Caroline

comments: author: Pankaj Jangid
body: Yes. That is correct. The group is not visible in the drop-down but as I type, it starts to appear as completion suggestion.

Looks like a bug.


author: Caroline R
body: Hi, [@Pankaj Jangid](/t5/user/viewprofilepage/user-id/853501),

I tested this on my side and confirmed that this is happening because currently, the branch permission dropdown will only show 5 results. So, if you have more than 5 users/groups in this repo, you will need to type their names to be able to see them.

In this case, I created a feature request to show more than 5 options in the branch permissions dropdown:

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

I would suggest that you add your vote there (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.

Kind regards,   
Caroline


author: Pankaj Jangid
body: Thanks. I've added my vote and also added a comment.


Tags: bitbucket-cloud

cloud
Bitbucket pipeline bash: docker: command not found
Asked by Chong Jing Hong:

I have tried both

```
options:
    docker: true
```

and

```
services:
    - docker?
```

but I am still receiving the error:
> bash: docker: command not found

My bitbucket-pipelines.yml file:  

```
- step:

        name: Get latest versions of libraries

        script:

          - docker build . -t selenium-chrome && \ docker run -it selenium-chrome python3

          - pip install selenium

          - pip install beautifulsoup4

          - pip install lxml

          - python webscrape.py

        services:

          - docker

        artifacts:

          - latest_vers.json
```

My Dockerfile:  

```
FROM selenium/standalone-chrome

USER root

RUN apt-get update && apt-get install python3-distutils -y

RUN wget https://bootstrap.pypa.io/get-pip.py

RUN python3 get-pip.py

RUN python3 -m pip install selenium
```


Answers:
author: Ankit Gupta
body: Hi Chong,

Is your pipeline yaml valid. You can check it [here](https://bitbucket-pipelines.prod.public.atl-paas.net/validator). The services method is what's recommended by Bitbucket.

Also, you can try the simplistic example provided [here](https://support.atlassian.com/bitbucket-cloud/docs/run-docker-commands-in-bitbucket-pipelines/#RunDockercommandsinBitbucketPipelines-ci_caching).


Tags: bitbucket-cloud

cloud

docker

selenium
API request failed with status 401 - Error occurring from 10-Mar-2022
Asked by Rommel Fernandes:

Hi,

I am using bitbuket pipeline to run automation tests and have a step to upload the results at the end of the test execution using the pipe. This has worked fine for me since October 2021 and has stopped working today from 10-Mar-2022. My code snippet is as below:  
- step:  
script:  
- apt-get update  
- apt-get install zip -y  
- zip EPPAutoTests/results_$BITBUCKET_BUILD_NUMBER.zip -r AutoTests/\*.html  
- pipe: atlassian/bitbucket-upload-file:0.3.2  
variables:  
BITBUCKET_USERNAME: $BITBUCKET_USERNAME  
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD  
FILENAME: AutoTests/results_$BITBUCKET_BUILD_NUMBER.zip

I have the above code working fine since October 2021, but when I executed it today I saw the below error in the pipeline:

INFO: Start uploading 1 files \['AutoTests/results_82.zip'\]...  
? API request failed with status 401. Check your username and app password and try again.

My password is still the same and has not been changed for a long time. Also I tried entering the username and password again in the repository variable but I am still facing the issue today.

Can someone please help me with resolving this issue. Thanks.


Answers:
author: Rommel Fernandes
body: I was earlier using my bitbucket password which I now replace with a bitbucket app password. Works fine now.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud