youngmon/atlassian-qna huggingface dataset:
Encountering Repository Over Size Limit Issue Despite Successful Local Cleanup - Need Assistance
Asked by Guy:

Hello Bitbucket Community,

I am encountering a persistent issue with my repository identified as exceeding the 4GB size limit, despite local cleanup operations. After using BFG Repo-Cleaner and Git's garbage collection on my local system, my repository size has been significantly reduced. However, when attempting to force push these changes to Bitbucket, the push is declined due to the repository still being over the size limit.

My repository's URL is: `https://bitbucket.org/<redacted>/<redacted>.git `.

The exact commands I have used are as follows:

1. Cloned a bare mirror of the repository: `git clone --mirror `<https://bitbucket.org/<redacted>/<redacted>.git>
2. Used BFG to remove \*.apk files: `java -jar /path/to/bfg.jar --delete-files *.apk`
3. Cleaned up and compacted the repository with Git: `git reflog expire --expire=now --all && git gc --prune=now --aggressive`
4. Attempted to force push the changes back to Bitbucket: `git push --force`

The error message I receive when trying to push is as follows:

    ?remote: Repository is over the size limit (4 GB) and will not accept further additions.To https://bitbucket.org/<redacted>/<redacted>.git! [remote rejected] main -> main (pre-receive hook declined)error: failed to push some refs to 'https://bitbucket.org/<redacted>/<redacted>.git'

Given that my local repository size is well below 4GB following the cleanup, I believe there might be a discrepancy in how Bitbucket is calculating the repository's size. Any help on how to rectify this would be greatly appreciated. Thank you in advance for your assistance!


Answers:
author: Patrik S
body: Hello [@Guy](/t5/user/viewprofilepage/user-id/5271656) and welcome to the Community!

After pushing the cleaned-up repository to Bitbucket, the removed objects become dangling in the repository and a git garbage collection (GC) needs to be executed in the remote repository to remove those objects that are still occupying space.

I went ahead and triggered a GC on the repository you shared, and the size went down to 772MB!

Now that GC is completed, I would highly recommend you having everyone on your team removing their old copies of the repository and doing a fresh clone of it. Since the old clones have a dirty history, it's better to delete them, so you don't risk pushing the dangling objects back into your cleaned repository, which would increase its size again.

Note: I've removed the repository and workspace name from your question to protect your privacy.

Thank you, [@Guy](/t5/user/viewprofilepage/user-id/5271656) !

Patrik S


Tags: bitbucket-cloud

cloud
Cant create a repo
Asked by Beau Bellamy:

I am trying to create a repo in my work workspace. I have previously been able to do this. [This post](https://community.atlassian.com/t5/Bitbucket-questions/Why-can-t-I-create-a-new-repository/qaq-p/1993101) indicates that it could be permissions or a localisation issue, but i have checked and my permissions are the same as other collegues that can create a repo, and the location is already set to English.

I get to the create repo stage, I select the project associated to the workspace but nothing happens when i press the create button.

![Screenshot 2023-07-19 165317.png](/t5/image/serverpage/image-id/269723iDA0E4314BF5559D9/image-size/large?v=v2&px=999 "Screenshot 2023-07-19 165317.png")


Answers:
author: Patrik S
body: Hello [@Beau Bellamy](/t5/user/viewprofilepage/user-id/4063620) and thank you for reaching out to Community!

I've checked your bitbucket account and confirmed you're an Admin of the workspace in question. In this case, to rule out any problem related to your local browser, I would suggest doing the following tests :

* Make sure you are using one of [Bitbucket's Support Browsers](https://confluence.atlassian.com/bbkb/which-web-browsers-does-bitbucket-support-1168845119.html#:~:text=Supported%20browsers&text=Bitbucket%20Cloud%20supports%20the%20latest,latest%20stable%20version%2C%20if%20necessary.) (update it to the latest version if possible)
* Try replicating this using your Browser's Incognito mode. This might help us to eliminate any potential local cache issues.
* If you are using an extension on your browsers, try temporarily disabling them and confirm if the issue persists.

If after following the suggestions above you are still facing the issue, please let us know so I can raise an internal support ticket for us to investigate further.

Thank you, [@Beau Bellamy](/t5/user/viewprofilepage/user-id/4063620) !  
Patrik S

comments: author: Beau Bellamy
body: Hi [@Patrik S](/t5/user/viewprofilepage/user-id/4603309)

Incognito worked, so i think it is associated to either cache or an browser extension.

Thanks for the responce


Tags: bitbucket-cloud

cloud

repository
getting docker resolutions errors, is there an outage?
Asked by gerald_kalafut:

Getting the following error running a pipeline (<https://bitbucket.org/aerialsphere/aerial-sphere-nx/pipelines/results/6401>)

*rpc error: code = Unknown desc = failed to pull and unpack image "docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-docker-daemon:v20.10.24-multiarch-prod-stable": failed to resolve reference "docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-docker-daemon:v20.10.24-multiarch-prod-stable": pulling from host docker-public.packages.atlassian.com failed with status code \[manifests v20.10.24-multiarch-prod-stable\]: 421 Unknown*

Is there an outage?


Answers:
author: Patrik S
body: Hello [@gerald_kalafut](/t5/user/viewprofilepage/user-id/4509759) and thank you for reporting this to us!

It looks like you were affected by an incident Bitbucket Cloud Pipelines was experiencing. Our engineering team already deployed a fix for this issue and the Pipelines services are fully operational again.

For more information about this incident, you can refer to Bitbucket status page:

* <https://bitbucket.status.atlassian.com/incidents/xkkk20jxjjkn>

We apologize for any inconvenience this has caused you and your team.

Thank you, [@gerald_kalafut](/t5/user/viewprofilepage/user-id/4509759) !

Patrik S


Tags: bitbucket-cloud

cloud
How to block merge PR by schedule?
Asked by Peter Bogdanov:

Hi all,

Our releases in Jenkins take around 1h to build. We have release day and time, let say Mon from 3PM to 8PM, if any PR merges in this time window, build fails and need to be started again. I need to prevent any merges to develop and release branches during this time window. Any ideas how to achieve that?

Thank you,

Peter


Answers:
author: Aron Gombas _Midori_
body: Write a one-line [merge check in Groovy for ScriptRunner](https://docs.adaptavist.com/sr4bib/latest/features/script-merge-checks)!

The script itself should just get the current system time and test if it is not within the unwanted period. We develop an app that heavily [relies on hooks and merge checks](https://www.midori-global.com/products/better-commit-policy-for-bitbucket/data-center/documentation/#hooks-and-merge-checks), and in our experience merge checks are absolutely reliable.


author: Hyrum Steffensen _Appfire_
body: Searching for "jenkins prevent a merge" also returns some interesting results.

<https://community.atlassian.com/t5/Bitbucket-questions/Prevent-merge-if-a-jenkins-build-fails-can-t-retrieve-successful/qaq-p/1504299>

<https://medium.com/@shandredreyer/github-using-jenkins-webhooks-and-status-to-prevent-a-pull-request-from-being-merged-443b43f36099>

Hyrum


author: Hyrum Steffensen _Appfire_
body: Hello Peter,

I did a Google search for, "jenkins automatically build on failure" and found an interesting suggestion on Stack Overflow for a Jenkins plugin. See the following links for further details:

<https://stackoverflow.com/questions/31870464/how-to-trigger-a-job-if-the-currently-running-job-failed>

<https://plugins.jenkins.io/downstream-ext/>

It may pay to check out other plugins for Jenkins.

An alternative would be to use a Jira scripting tool as found on the Atlassian Marketplace such as [Scriptrunner](https://scriptrunner-docs.connect.adaptavist.com/jiracloud/scheduled-jobs.html), [JMWE](https://innovalog.atlassian.net/wiki/spaces/JMWEC/pages/1241186334/Scheduled+actions) or [Power Scripts](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15480692/SIL+Scheduler). Perhaps there are some Jenkins REST endpoints you could use in a script to restart the build depending on your use case. However, in practice, I would prefer to do this in Jenkins. An error handler is always better than a scheduler.

Regards,

Hyrum

Please note that I am a product engineer for Power Scripts and I work for Appfire.


Tags: bitbucket-server

server
Missing API for default tasks
Asked by nicobrys:

In 2022, default tasks has been released on Bitbucket cloud:

<https://bitbucket.org/blog/default-pull-request-tasks>

It seems no API is available to perform this task? Please add an API endpoint to add default tasks to a respository


Answers:
author: Aron Gombas _Midori_
body: I checked the REST API documentation, and I can confirm that there is no documented end-point to work with these.

Tip: you could eventually check the network tab of your browser for request-response pairs to see what goes from the browser to Bitbucket when you work with pull request tasks. We sometimes find interesting things that way, although there is a risk that they can change any time because they are considered "internal". But, if it is important, then you could try.

comments: author: nicobrys
body: Not really a solution. I want official support for this in the API so this can be added in the terraform provider as a 2nd step


author: nicobrys
body: How can i get this converted into an official feature request?


author: Patrik S
body: Hello [@nicobrys](/t5/user/viewprofilepage/user-id/3437475) and thank you for reaching out to Community!

Just adding to [@Aron Gombas _Midori_](/t5/user/viewprofilepage/user-id/502447)'s comment, Bitbucket Cloud API indeed does not currently publish an API for Pull Requests default tasks. It's only possible to add/update default tasks using the UI by navigating to **Repository Settings \> Default Tasks**.

I went ahead and create a feature request to add an API endpoint for default tasks :

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

I would encourage you to add your **Vote** there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with [this policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) in mind.

Thank you, [@nicobrys](/t5/user/viewprofilepage/user-id/3437475) !

Patrik S


Tags: bitbucket-cloud

cloud
bitbucket cloud alternative
Asked by prakrity agarwal:

due to certain organization constraints ,we will not be able to use cloud. is there an alternative to bitbucket cloud that we can utilise.


Answers:
author: Aron Gombas _Midori_
body: If you can't go cloud, then the best options are:

1. [Bitbucket DC](https://www.atlassian.com/enterprise/data-center/bitbucket) - very different from Bitbucket Cloud, but assuming you are a happy Atlassian customer, it could be the easiest to integrate to your toolchain.
2. [GitLab](https://about.gitlab.com/) - very popular option, does a lot more than just hosting your code. There is a self-hosted variant if you can't use the cloud one.
3. [GitHub Enterprise](https://github.com/enterprise) - also popular.

All these are Git-based, as I assumed it is a requirement for you.

comments: author: prakrity agarwal
body: if i see from cost perspective which would be fine. like taking into consideration the yearly renewal and number of users


author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

Bitbucket Data Center is the closest competitor (and has compatible data, and works much the same way)


Tags: bitbucket-server

server
Using Source Tree commercially (software development)
Asked by Mi?o D?eko:

Hello,

I've looked into using Source Tree at my workplace and wanted to make sure that I wasn't breaking any licences. Found this knowledge base article about corporate usage:

<https://confluence.atlassian.com/sourcetreekb/sourcetree-license-for-corporate-usage-388404078.html>

but it says that it is not valid since version 1.8 for windows. How can Source Tree be used commercially? Not reselling source tree, but software development. Thank you in advance.


Answers:
author: Ana Retamal
body: Hi [@Mi?o D?eko](/t5/user/viewprofilepage/user-id/3491812) , welcome to the Atlassian Community :)

The article you linked is not valid because Sourcetree no longer uses 'licenses'. Any user could install a copy, register with an account, and they're free to go. Sourcetree is also completely free for commercial use. You're not allowed to sell Sourcetree itself, but you can use it to develop your products, even if you're going to obtain profit from selling them.

This question has also been asked in the past, you can find some other example [here.](https://community.atlassian.com/t5/Sourcetree-questions/Can-Sourcetree-be-used-for-free-by-the-development-group-in-the/qaq-p/987667)

Hope that helps, Mi?o! Let us know if you have any other questions.

Best regards,

Ana

comments: author: Mi?o D?eko
body: Thank you


Tags: licence
Not able to register for source tree free licence
Asked by Nitin Tayal:

when i try for free licence of source tree after clicking the registration button   
the link which is opened is   
<https://my.atlassian.com/license/sourcetree>  
but it says page not found please rectify it or send us other solution to use source tree


Answers:
author: Ana Retamal
body: Hi Nitin, welcome to the Community!

Sourcetree no longer needs a license, so I'm wondering if that's some old link that accidentally came out with a recent update, or if you're using an old version. Could you answer the following questions to help you understand the situation?:

1. Which Sourcetree version are you using?
2. Are you on Windows or Mac?
3. How do you arrive to that step? Can you send us a screenshot?
4. Can you see any other options instead of going for the registration?

Let us know,

Ana
I can not use Git Flow properly
Asked by Alejandro Mora:

i'm trying to use git-flow in my repository but when i initialize the git-flow with sourcetree the program make some weird because when i click on GitFlow button in the top, the sourcetree is taken the current branch as a feature don't matter if i have select master or develop anycurrent branch is taken as feature and ask my if i want to finish, i don't do any more that clone my repo and initialize then init git flow with default config all with sourcetree  
i don't know why have this behavior  

my config file:
>
> \[core\]  
> repositoryformatversion = 0  
> filemode = false  
> bare = false  
> logallrefupdates = true  
> symlinks = false  
> ignorecase = true  
> \[remote "origin"\]  
> url = git@bitbucket.org:Goders/frontend.git  
> fetch = +refs/heads/\*:refs/remotes/origin/\*  
> \[branch "master"\]  
> remote = origin  
> merge = refs/heads/master  
> \[gitflow "branch"\]  
> master = master  
> develop = develop  
> \[gitflow "prefix"\]  
> feature =  
> bugfix =  
> release =  
> hotfix =  
> support =  
> versiontag =  
> \[gitflow "path"\]  
> hooks = C:/Users/oamor/WebstormProjects/frontend/.git/hooks  
>
> <br />
>
![image.png](/t5/image/serverpage/image-id/60488iE1DD1CC2D915EE53/image-dimensions/267x300?v=v2 "image.png")


Answers:
author: Mike Corsaro
body: Hello! Looks like the git-flow config isn't setup properly. Modify your config file under the "\[gitflow "prefix"\]" part to look like this:

```
[gitflow "prefix"]
  feature = feature/
  release = release/
  hotfix = hotfix/
  support = support/
  versiontag =
```

comments: author: akira.kawasaki
body: ?????????????????

SourceTree ? Version 3.2.6.3544

?? Git ? 2.21.0 ???

"\[gitflow "prefix"\]" ?????????????????????????????????????????????????

?????????????git-flow-init ???????????????????????????????

??? -2017 ??????????????????????????????\[gitflow "prefix"\]?????????????

???????????????????????????????????????????

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


Tags: bitbucket

bitbucket-cloud

cloud
Does Sourcetree support 'git log --follow' ?
Asked by Sam Morehouse:

We have files in a repo that were moved within the repo. If you use "git log" on these files, you don't see the full history of the files before the 'git mv' was done. If you use 'git log --follow' on these files, you see the full history before and after the move. Is there a way to configure Sourcetree to use 'git log --follow'? Git for Eclipse supports this feature.


Answers:
author: Mikael Sandberg
body: Hi [@Sam Morehouse](/t5/user/viewprofilepage/user-id/3486938),

Welcome to the Atlassian Community.

When you do the log selected in Sourcetree there is a checkbox for "Follow renamed files".

comments: author: Sam Morehouse
body: Yes there is, and it works!! Thank you!
Getting an error while pushing the code to remote through source tree in Mac.
Asked by Saswati.Rout:

ERROR IS

Authentication failed for BITBUCKET.

remote: Invalid username or password.

Need help on this.


Answers:
author: Ana Retamal
body: Hi Saswati, welcome to the Community :)

The error message is showing that there's some problem with the credentials. Can you answer the following to help us troubleshoot your issue?:

1. Do you get this error when pushing from the command line too?
2. Have you changed your credentials recently?
3. Do you have more than one account associated with Sourcetree?
4. Does this happen when you perform any operation?
5. Have you tried [wiping Sourcetree preferences](https://confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html)?

Let us know!  
Ana


Tags: mac
How do I find out what version of .NET a specific version of Sourcetree is compatible with?
Asked by CSAngel:

I am using an older version of Windows 10 that has an older .NET version and cannot install the latest version of Sourcetree. How can I find out which version of Sourcetree will work with which .NET version?


Answers:
author: CSAngel
body: NM - found the answer in the release notes :)


Tags: version

windows
i cannot add my account to sourcetree
Asked by fractal-fantasy:

Cant log-in on browser using my username (only my gmail) my username is associated with my gmail account so perhaps thats why.

The main issue is that I can't login to my bitbucket account on sourcetree (i always get "login failed", or authentication failed) I'm 100% using the right password and credentials - tried both my gmail and my username. I also tried the OAuth token login, which says it's sucessful via the browser but not Sourcetree.

I've had similar login issues with Sourcetree for a few years now, usually find a hacky solution.. I think the developers of SourceTree really need to address these login/authentication bugs. This functionality should be rock solid, this often ruins a full day of work for me.


Answers:
author: Mike Corsaro
body: Hello! If OAuth is not working then it's probably due to some local anti-virus or firewall policy that's preventing communication to localhost on a specific port.

To help us:

* What's the OS you're using?
* What's the version of Sourcetree you're using?
* Do you have the latest version of git installed?

If you cannot login via the browser, have you tried resetting your password?
Can't login with bitbucket on source tree (again...)
Asked by chrishemmens:

![bitbucket-frustrations.gif](/t5/image/serverpage/image-id/60320iCB0CBD011CF04314/image-size/large?v=v2&px=999 "bitbucket-frustrations.gif")

It worked before... for a while. And now it's borken (again) I don't understand why. Nearly everytime there's a new version of git comes out SourceTree authentication breaks. I tried switching to the embeded version of git and that doesn't work either.


Answers:
author: Ana Retamal
body: Hi Chris,

I'm sorry to hear that Sourcetree is not working for you. Can you give us some more information about your environment to help us troubleshoot your issue?:

1. Are you using Sourcetree for Mac or for Windows?
2. Wich version do you have
3. Have you checked the [logs](https://confluence.atlassian.com/sourcetreekb/sourcetree-logfile-location-675384748.html)?
4. Which browser and version are you using?

Let us know!

Ana


Tags: bitbucket
Source - How to avoid unnecessary files being committed
Asked by Jeanette Bautista:

I always have an issue with sourcetree that when I commit a file or files, the number of pushed displays more than the changes I made. When I tried to do the push, other files which I never made any changes appeared modified in git.

Can anyone share their tips on how to avoid this?

Cheers


Answers:
author: Mike Corsaro
body: Hello! Could you provide more info such as the version of Sourcetree, and OS you're using?

There's a few things you should be aware of:

* When committing files, make sure you only check the files that you'd like to have committed
* If there's files you do not want committed you can right click on them and select "Ignore"
* The number displayed next to the push button is the number of commits that will be pushed, not the number of files. This number could be different than the number of commits you've made if you've performed a merge for example.
Using Sourcetree Add repository which cloned by Git command
Asked by Shengying Sun:

Dear there,

I am doing some experiment that switch using Git command line and Sourcetree to manage my repository, I had cloned a local repository from bitbucket, when I open Sourcetree to try to Add the local repository I encountered the Git failed with code 128: this operation must run in a work tree. I tried below commands but it did not work.

del .git\\index

git reset

Does anyone have idea to solve this problem?

Best Regards

Shawn


Answers:
author: Mike Corsaro
body: Hello! Have you tried using Sourcetree to clone the repository?

comments: author: Shengying Sun
body: Hello,

Thank you. Using Sourcetree to clone the repository will work, but still want to know how to add an existing local repository to Bitbucket. Another scenario is I cloned the repository using Bitbucket, then I close the repository tab on Sourcetree, when I tried to add the local repository back to Sourcetree, it does not work, it does not make sense, right?
How to disable the forcing of users to send anon data on first run
Asked by Kevin Lim:

Hi,

I am in the process of deploying sourcetree enterprise to users in our corporate environment but on first run you are unable to continue (under preferences) unless you tick the send anon data usage option. I know this can be disabled in the options later but as this is a corporate deployment, is there any way to stop users from having to do these steps?

Thanks.

Regards,

<br />

Kevin


Answers:
author: Mike Corsaro
body: Hello! This is actually a bug in our installer and is currently fixed in our beta releases. We're planning to release the next version with this fixed sometimes in the next few weeks.

Thanks!