youngmon/atlassian-qna huggingface dataset:
Above the 4 GB size limit further commits are rejected
Asked by francesco3nd:

We suddenly have the problem of exceeding 4gb in our repository.

We did not commit any large files: our last commits had only a few dozen source files, jsp, js etc.

We quickly went from 3.8gb (a few hours ago when we saw the warning) to 4.6gb. We do not understand what could have caused this increase.

We have run the commands twice as per your guide (git reset --hard and git push --force), repository is still blocked.

Can you please help us?

<br />

Here is the log in local of **git count-objects -vH**

count: 263  
size: 1.03 MiB  
in-pack: 612790  
packs: 6  
size-pack: 257.76 MiB  
prune-packable: 77  
garbage: 0  
size-garbage: 0 bytes

Here the log of last command execution

user@devops:\~/git/vino75$ git reset --hard @{u}\^  
Updating files: 100% (12766/12766), done.

HEAD is now at 124bc96e18 Merge branch 'master' into develop  
user@devops:\~/git/vino75$ git push --force  

Total 0 (delta 0), reused 0 (delta 0), pack-reused 0  
remote: WARNING Repository size in Bitbucket is currently 4.6 GB  
remote: Above the 4 GB size limit further commits are rejected  
remote: Garbage collection will run automatically to help reduce the size of the repository. Wait until GC is complete to continue. This usually takes less than fifteen minutes but can take up to an hour. If you are still having issues after GC has finished, contact us at support.atlassian.com to increase your repository's size limit.  
remote: HINT Learn how to reduce repository size: <https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/#Rewind-history-to-undo-large-commits>  
remote: Create pull request for develop:  
remote: [https://bitbucket.org/3nd/vino75/pull-requests/new?source=develop\&t=1](https://bitbucket.org/3nd/vino75/pull-requests/new?source=develop&t=1)  
remote:  
To <https://bitbucket.org/3nd/vino75.git>  
+ b2d19fbcbb...124bc96e18 develop -\> develop (forced update)  

<br />

<br />


Answers:
author: francesco3nd
body: UPDATE: Support solved this issue, running GC.

comments: author: Dimitry Rybkin
body: Erm, so does support have to do GC? How did you contact them exactly? I need the same done.


author: francesco3nd
body: Hi Dimitry,

we switched to the paid plan and received support within a few hours


author: Dimitry Rybkin
body: hmmm, I don't see why one needs to purchase another plan to get support on what should be a core function of hosting a GIT repo. If anything, it detracts from me purchasing anything from Atlassian. I mean, really, I need to get a plan to be able to contact support - to perform a function which I shouldn't have to contact support about? wtf?

My repo isn't even locked, I've recently cleaned it, and it still says that it's 2.9 GB out of 4 GB.

But the actual cleaned size is 320MB.


author: francesco3nd
body: In our case, we urgently needed to get the problem solved quickly, which is why we changed the plan. I don't know if the same kind of support is also given with the free plan.


author: Dimitry Rybkin
body: No worries - thanks for letting me know.


Tags: bitbucket-cloud

cloud
How should I set the LOCAL_PATH variable correctly?
Asked by Rodrigo Sarri:

I hope you are doing well! I'm facing a problem when trying to deploy using Bitbucket pipeline.

The project is a React project at version 18.2.0 and its files are in the frontend folder.

bitbucket-pipelines.yml

```
image: atlassian/default-image:3

# Workflow Configuration

pipelines:

  branches:

    staging:

      - parallel:

        - step:

            name: Build and Test

            script:

              - npm install --prefix ./frontend/ --legacy-peer-deps

              - npm audit fix --force --prefix ./frontend/

              - npm audit fix --force --prefix ./frontend/

              - npm run build --prefix ./frontend/

            artifacts:

              - ./frontend/build/**

      - step:

          name: Deploy to Staging

          deployment: Staging

          script:

            - pipe: atlassian/scp-deploy:0.3.3

              variables:

                USER: $USER

                SERVER: $SERVER

                REMOTE_PATH: '/var/www/html'

                LOCAL_PATH: './'
```

The error that I am not able to solve is related to the LOCAL_PATH folder.  

```
./frontend/build/*
No such file or directory
```

```
./build/*
No such file or directory
```

```
./
error: unexpected filename: .
```

```
build
No such file or directory
```

```
$BITBUCKET_CLONE_DIR
/var/www/html/build: Permission denied
```

```
.
error: unexpected filename: .
```

```
/
error: unexpected filename:
```

Thanks in advance for any help


Answers:
author: Rodrigo Sarri
body: I used it like this and it worked:

artifacts:  
- frontend/build/\*\*  
...  
LOCAL_PATH: 'frontend/build/\*'


author: Ben
body: Hey Rodrigo,

When you run a pipelines build, the working directory is the clone directory of the repository itself: /opt/atlassian/pipelines/agent/build

If you need to access files within a folder called "react" for instance, I'd suggest using the following format "/react".

If you are still having issues navigating to the correct folder, I'd suggest running the following command in the build so you can view the folder structure accordingly:

```
ls -lah
```

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Jira commit checker on BitBucket cloud?
Asked by patrick feerick:

I am trialling BBC along with Jira cloud. Am I right in assuming that the Jira commit checker is not available? If not is there any likelihood it would come available?


Answers:
author: Aron Gombas _Midori_
body: It is not available and there is solution available because it is not possible to develop custom hooks for Bitbucket Cloud!

Here is the related feature request (don't forget to vote on it!): <https://jira.atlassian.com/browse/BCLOUD-10471>

comments: author: patrick feerick
body: Thanks. Wow, this has been requested for over 2 years...


author: Aron Gombas _Midori_
body: Actually it is at least 5 year old! Anyway, please accept my answer if it was the right one.


Tags: bitbucket-cloud

cloud
Webhooks limit
Asked by Antonio Grandinetti:

Hi all, can I increase the webhook limit per repository? I'm working with a repository that is expected to grow to over 200 sites and require more than 200 webhooks, however, the webhook limit is 50 per repository. Thanks in advance.


Answers:
author: Syahrul
body: Hey [@Antonio Grandinetti](/t5/user/viewprofilepage/user-id/5082536)

G'day and Welcome to the community!

I have removed the webhook limit on your Workspace.  
Can you check on your end and verify with me if you are still blocked?

Cheers,  
Syahrul

comments: author: Antonio Grandinetti
body: Hi Syahrul,

ty very much! Now I can add all webhooks above 50.

Best Reguards

Antonio


author: MakCircle Co__ Ltd
body: i would like request increase push webhook on my account also. i can get webhook only 60 push


Tags: bitbucket-cloud

cloud
Delay or prioritize webhooks, two payloads
Asked by Nora Rydding:

Hi!

We have a job in Jenkins which we want to trigger on push, but also on pull request opened and pull request branch updated. This job is configured to use the Generic Webhook Trigger plugin with a token.

However, by doing this, a push to the pull request branch also fires the regular push webhook. Whenever there is an event related to Pull Request, that is the payload we want, but we only receive the "repo:refs_changed" event. It seems that Jenkins only recieves the payload from one of the triggers.

```
10:10:00  Generic Cause10:10:00  Generic Cause10:10:00  GenericWebhookEnvironmentContributor10:10:00   Received:10:10:00  10:10:00  {"eventKey":"repo:refs_changed",.......}
```

As you can see on this log from jenkins, it has been triggered twice, which is correct (the push, and pull request branch updated event). Is there any way to add a delay to the push event on the webhook or somehow change the order the payloads are sent from Bitbucket so that we can continue or Jenkinsjob with the payload we want?


Answers:
author: Oleksandr Kyrdan
body: Hi [@Nora Rydding](/t5/user/viewprofilepage/user-id/5082388)

Thank you for your question!

Maybe it is a good case for the [jenkins-job-trigger pipe](https://bitbucket.org/atlassian/jenkins-job-trigger):

```
script:  - pipe: atlassian/jenkins-job-trigger:0.3.1    variables:      JENKINS_URL: 'http://my-jenkinsio-host:8080/job'      JENKINS_USER: $JENKINS_USER      JENKINS_TOKEN: $JENKINS_TOKEN      JOB_NAME: 'staging-awesome-project-job'
```

Best regards,  
Oleksandr Kyrdan


Tags: bitbucket-server

jenkins

server

webhook
Bitbucket crashing when creating PR - can it be done from bash?
Asked by ZimaTechOli:

Hello!

I want to create a pull request. Usually, I do this from within the web interface, i.e. go to *Branches* then click *Create* under *Pull request*.

But since today, the web interface crashes when I do this.

Is there another way to create a pull request? Can it be done from bash? And if, how?


Answers:
author: Erez Maadani
body: Hey [@ZimaTechOli](/t5/user/viewprofilepage/user-id/5082496)

Have a look here: <https://developer.atlassian.com/server/bitbucket/rest/v806/api-group-pull-requests/#api-api-latest-projects-projectkey-repos-repositoryslug-pull-requests-post>

comments: author: ZimaTechOli
body: Thanks! I'll keep that in mind for the next time (hopefully never happening)


author: ZimaTechOli
body: I got it to work. Instead of going to *Branches* then clicking *Create* under *Pull request* , I selected *Create...* (from the header navigation) then *Pull request*. This worked. Just in case anybody else is running into the same problem.


Tags: bitbucket-cloud

cloud
Retrive Delete repository
Asked by rajesh.k:

Hi,

we need retrive the deleted repository can you please help me get this


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@rajesh.k](/t5/user/viewprofilepage/user-id/5082331) ,

welcome to the Atlassian community!

You can't do that by yourself. You need to raise a support request to the Atlassian team thorough the following link <https://support.atlassian.com/contact/>

Hope this helps,

Fabio


Tags: bitbucket-cloud

cloud
Host key verification failed - ssh and known hosts set
Asked by Mylene Kreiger:

Hi everyone :)

I have a typo3 project wich I want to deploy on my server via bitbucket pipeline and deployer. Everything works fine until the actual deploy on server. I always get an error "host key verification failed".

I added a new ssh key pair in the pipeline, copied the public to my hosting provider for access, added the know hosts via bitbucket as IP-address and url with the right port:

![Bildschirm?foto 2022-11-18 um 08.30.26.png](/t5/image/serverpage/image-id/226456iD4015DC019676105/image-size/large?v=v2&px=999 "Bildschirm?foto 2022-11-18 um 08.30.26.png")  
Unfortunately my hosting provider only allows ssh for approved IP-addresses. Therefore I added all IP-addresses concerning bitbucket to the approved ones.

After all these arrangements I still get the same error and I really don't know what I am doing wrong. Would really appreciate it, if someone could help me :D

I am really sorry if I forgot some important informations, this is my first post in the community. I will provide them as quick as possible.

Greetings, Mylene


Answers:
author: Erez Maadani
body: Hey [@Mylene Kreiger](/t5/user/viewprofilepage/user-id/5082276)

Before deploying your server, try printing the contents of the known hosts file:

```
 cat?~/.ssh/known_hosts
```

This way you can verify the file contains the key for the requested server.

If it's not, you can try and add it manually during the pipeline.

```
echo $(ssh-keyscan -t rsa bitbucket.org) >> ~/.ssh/known_hosts
```

comments: author: Mylene Kreiger
body: Thanks [@Erez Maadani](/t5/user/viewprofilepage/user-id/5018344) for your fast answer :)

I have added the printing and it seems bitbucket.org is in the known hosts, but still the same error. How is this possible?

![Bildschirm?foto 2022-11-18 um 09.59.41.png](https://community.atlassian.com/t5/image/serverpage/image-id/226476iEA4CFD07E904A9BB/image-size/large?v=v2&px=999 "Bildschirm?foto 2022-11-18 um 09.59.41.png")


author: Erez Maadani
body: Try the second command again but use your server URL/IP instead of bitbucket.org:

```
echo $(ssh-keyscan -t rsa your-server-url-here) >> ~/.ssh/known_hosts
```


author: Mylene Kreiger
body: Thanks, that worked!


author: Daniel Fuentes
body: Thank you so Much [@Mylene Kreiger](/t5/user/viewprofilepage/user-id/5082276) \& [@Erez Maadani](/t5/user/viewprofilepage/user-id/5018344) it work for me also!!!!


Tags: bitbucket-cloud

cloud
bitbucket pipelines pipes to create JIRA ticket
Asked by tamil.needi:

Hello Team ,

By using the below pipes do we have an option to upload an attachment ?

I can see only few fields

<https://bitbucket.org/product/features/pipelines/integrations?p=atlassian/jira-create-issue>


Answers:
author: Oleksandr Kyrdan
body: Hi [@tamil.needi](/t5/user/viewprofilepage/user-id/5082194)

Thank you for your suggestion!  
Currently the [jira-create-issue pipe](https://bitbucket.org/atlassian/jira-create-issue/src/master/) supports only text summary and description.

If you'd like to suggest a pipe to be improved or new pipe to be implemented, please, find the appropriate ticket in the [list of existing tickets](https://jira.atlassian.com/browse/BCLOUD-13452?filter=97052) , vote for them or create a new suggestion request with type *Suggestion* and *Component: Pipelines - Pipes* .

Best regards,  
Oleksandr Kyrdan

comments: author: tamil.needi
body: Hi [@Oleksandr Kyrdan](/t5/user/viewprofilepage/user-id/2885705)

Thanks for your answer, will do the same


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Bitbucket pipelines
Asked by Dmitry Muz:

How can I provide a default pipeline variable (BITBUCKET_BRANCH for e.x.) to my remote host on Ubuntu via SSH? I mean something like: **ssh $user@$address "bash /var/www/pull.sh $BITBUCKET_BRANCH"**

In such a case $BITBUCKET_BRANCH is always empty on bash executing


Answers:
author: Dmitry Muz
body: So I found out a great image from atlassian **atlassian/ssh-run:0.4.1** and now it works

I just passed ENV_VARS: "BITBUCKET_BRANCH=$BITBUCKET_BRANCH" into variables


Tags: bitbucket-pipelines

cloud
Can App Password be used to create a branch
Asked by Sam Bennett:

When creating the App Password, I am able to select the permission repository:write. However, whenever I attempt to use:

POST /2.0/repositories/{workspace}/{repo_slug}/refs/branches

all it does is returns the list of branches. I can see that it states:  
**[OAuth 2.0 scopes](https://developer.atlassian.com/cloud/bitbucket/scopes-for-oauth-2-3LO-and-forge-apps/) required:**  
`repository:write`  
But does that mean that this can only be used through an OAuth request?


Answers:
author: Ben
body: Hey Sam,

App Password can indeed be used to execute API requests such as this one.

You can run the following request to **create a branch** using the /2.0/repositories API endpoint:

```
curl https://api.bitbucket.org/2.0/repositories/{workspace}/{repository}/refs/branches 
-s -u username:AppPassword -X POST -H "Content-Type: application/json" 
-d '{
"name" : "{new_branch_name}",
"target" : {
"hash" : "main"
}
}'
```

"Main" should be the existing branch or commit hash from where you want to create a new branch.

The API documentation can be found here:

<https://developer.atlassian.com/cloud/bitbucket/rest/api-group-refs/#api-repositories-workspace-repo-slug-refs-branches-post>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Unable to clone bitbucket repo stuck at "cloning into"
Asked by Nicole Lyu:

I use a Mac and I have followed the steps to create a token. I went to my team's Bitbucket repo and clicked on "Clone". I created an empty folder just for bitbucket. ![Capture-bit.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/226372i010A73260190703B/image-size/large?v=v2&px=999 "Capture-bit.PNG")I opened the terminal and used "git clone" and then pasted in the link generated by "Clone" button. But the terminal got stuck at the "Cloning into" step and never asked me about username and password. See attached.


Answers:
author: Syahrul
body: Hey [@Nicole Lyu](/t5/user/viewprofilepage/user-id/5082007)

G'day and Welcome to the community!

I would suggest you use the following command to generate more verbose logs to understand why the clone got stuck:

```
GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_CURL_VERBOSE=1 <git command_here>
```

That said, try using an external network, such as VPN or mobile Hotspot, to see if you have any issues, as it may be an issue with your local network blocking the port or connection.

Let me know how it goes.

Cheers,  
Syahrul


Tags: bitbucket-cloud

clone

cloud

repository
Prevent users accidentally from creating public repos
Asked by Joseph Lamoree:

I've seen a few questions from years back about applying permissions to restrict a user from accidentally creating a public repository, and they have been unanswered or the answer was that this is not possible in Bitbucket Cloud.

Is it still not possible to prevent users in a Bitbucket Cloud workspace from accidentally creating public repositories? The user group permissions selector I see only supports restricting whether a user can create a repository, not its privacy. Is the workaround to set the private flag on projects, and then ask that users not create new projects?

Thank you.


Answers:
author: Ben
body: Hey Joseph,

Unfortunately, the ability to restrict the creation of public repositories is still in the works and is being tracked here:  
<https://jira.atlassian.com/browse/BCLOUD-13050>

Please feel free to "Watch" this ticket for future updates and "Vote" for it to increase its visibility with regard to customer demand.

At this stage - private projects will prevent users from creating public repositories within them. If you want to ensure users aren't creating projects - you can ensure that users are in the appropriate user groups (ie not given admin access to do so).

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
what are supplied helm varaible that can be used azure-aks-helm-deploy:2.0.0
Asked by Asaf Moalem:

Hi All,  
Is there a complete list of optional variables that can be used for "azure-aks-helm-deploy:2.0.0"  

e.g - HELM_VERSION; HELM_RELEASE_NAME, etc'.  

Regards  
Asaf.


Answers:
author: Oleksandr Kyrdan
body: Hi [@Asaf Moalem](/t5/user/viewprofilepage/user-id/5081678)

Thank you for your question!

More detail for the [azure-aks-helm-deploy pipe](https://bitbucket.org/atlassian/azure-aks-helm-deploy) you could find in the [pipe's repository](https://bitbucket.org/atlassian/azure-aks-helm-deploy).

```
script:  - pipe: atlassian/azure-aks-helm-deploy:2.0.0    variables:      AZURE_APP_ID: '<string>'      AZURE_PASSWORD: '<string>'      AZURE_TENANT_ID: '<string>'      AZURE_AKS_NAME: '<string>'      AZURE_RESOURCE_GROUP: '<string>'      # HELM_VERSION: '<string>'      # HELM_RELEASE_NAME: '<string>'      # HELM_CHART_NAME: '<string>'      # HELM_CHART_DIR: '<string>'      # HELM_COMMAND: '<string>'      # HELM_COMMAND_WAIT: '<string>'      # HELM_UPGRADE_INSTALL_IF_NOT_PRESENT: '<string>'      # DEBUG: '<boolean>' # Optional
```

Best regards,  
Oleksandr Kyrdan

comments: author: Asaf Moalem
body: Thanks for the answer, I already worked with this manual, but i found from other forums other variables that are not listed here,  
example - "HELM_COMMAND_ARGS"  
and wanted to know if there any more or where i can dig out the list?


author: Oleksandr Kyrdan
body: Hi [@Asaf Moalem](/t5/user/viewprofilepage/user-id/5081678)

Yes, you are right, this variable is not described in the docs.

We'll add it to the Readme soon.

Also, [code of the pipe is public](https://bitbucket.org/atlassian/azure-aks-helm-deploy/src/master/pipe/pipe.sh). If you have any improvements and ideas how to make the pipe better, your PRs are welcome. ?

Thank your for your contribution to the community!

Best regards,  
Oleksandr Kyrdan


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

helm
Has anyone come across the Pre-receive hook error
Asked by Tejeshwar:

! \[remote rejected\] feature/ARSI_RT_Stack_Devp -\> feature/ARSI_RT_Stack_Devp (pre-receive hook decli


Answers:
author: Erez Maadani
body: pre-receive hook is a server side hook/script called after the commit is pushed by the client and before the server allow the commit into the remote.

Since it's a server side hook, the right person to ask this question is the repo admin.


Tags: bitbucket-server

server
Bitbucket API OAuth vs App password
Asked by Sander Mol:

Greetings Atlassian community,

Not being too familiar with OAuth, I was wondering what the recommended approach would be for the following use-case.

We have a metrics scrape service, that basically scrapes the different Bitbucket API endpoints of our instance in-order to get a complete metrics overview of our different projects. This is a continuously running service that scrapes each minute. This service is owned by a (internal service) team.

For this use-case, I was wondering what the best approach for authenticating with the Bitbucket API. OAuth requires a bit more complexity in code, whereas an App Password is much more simple.

Any recommendations between OAuth vs App Password?


Answers:
author: Ben
body: Hey Sander,

The decision to use AppPassword vs OAuth will all come down to personal preference.

For both, they require the knowledge of both a username as well as a specific token. The difference is, OAuth is configured at the workspace-level meaning that anyone on that workspace can generate tokens if they have the necessary read/write permissions and the permissions granted by that token are configurable, whereas AppPassword is configured on the personal level and the access is based on the access that personal account has to the workspace.

OAuth will require, as you stated - more code complexity and tokens expire after a certain time - meaning that it is generally more secure vs AppPassword where this does not expire however both can be revoked/regenerated at any time.

As long as OAuth tokens/AppPasswords are not shared with third-party users, you can consider these both secure.

If you are wanting simplicity, AppPassword would be the suggested choice - if you are wishing to favour security at the cost of code complexity, OAuth is the suggested choice.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: authentication

bitbucket-cloud

cloud

oauth

rest-api

security
Any recommended study material for bitbucket pipeline?
Asked by Ngeh N:

Hello,

I'm starting a project on bitbucket. I wish to find out if there's any recommended materials for bitbucket pipeline.

Thanks


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Ngeh N](/t5/user/viewprofilepage/user-id/5081131) ,

welcome to the Atlassian community!

My suggestion is to take a look to the Atlassian documentation. You can start from here <https://support.atlassian.com/bitbucket-cloud/docs/get-started-with-bitbucket-pipelines/>

Hope this helps,

Fabio

comments: author: Ngeh N
body: Thanks a lot


author: Oleksandr Kyrdan
body: Hi [@Ngeh N](/t5/user/viewprofilepage/user-id/5081131) [@Fabio Racobaldo _Herzum_](/t5/user/viewprofilepage/user-id/781528)

Thank you for your question!

Also good idea to follow the [**12 Days of CI/CD**](https://bitbucket.org/blog/12-days-of-ci-cd) series and to discover more Bitbucket Pipes as part of Bitbucket Pipelines infrastructure, visit [**Bitbucket Pipes Marketplace**](https://bitbucket.org/product/features/pipelines/integrations).

Best regards,  
Oleksandr Kyrdan

comments: author: Ngeh N
body: Thanks


Tags: bitbucket-cloud

bitbucket-pipelines

cloud