youngmon/atlassian-qna huggingface dataset:
whats this error and how can i resolve it ?
Asked by Hamid:

![Error.png](/t5/image/serverpage/image-id/340254i0A4D42065A6F8245/image-size/large?v=v2&px=999 "Error.png")


Answers:
author: Ben
body: Hi [@Hamid](/t5/user/viewprofilepage/user-id/5558133)

If you had a build that was successful previously, and this has suddenly failed - I would suggest checking the build logs for both successful and failed builds to see if there is a difference in the image SHA shown in the Build Setup of your build logs. If there is a change, I'd suggest copy-pasting the image SHA for a successful build into your YML configuration where the build image is defined and attempting to run a fresh build to see if the image is the problem:

**Example**

```
// Build logs
Images used:
build : docker.io/atlassian/default-image@sha256:a7cbf7b491d60202dcdec4628679b8ba6da27b8fffa8bce2cc3d29a9ac9359f3
```

    // YML config:

    image: http://docker.io/atlassian/default-image@sha256:a7cbf7b491d60202dcdec4628679b8ba6da27b8fffa8bce2cc3d29a9ac9359f3

If this is not the case - I'd suggest enabling debugging as mentioned in the error and reaching out to the SonarSource community, as the error shown is not Pipelines-specific:

* <https://community.sonarsource.com/>

You can also raise a ticket with our support team directly, as you are entitled to Standard level support due to your workspace membership of a Standard subscription workspace - please use the paid workspace URL when prompted:

* <https://support.atlassian.com/contact>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
bitbucket default runner issue
Asked by Santhakumar G:

bitbucket default runner not working in pipeline


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

I see that you have created a support ticket for this issue and one of my colleagues let you know that the most likely reason for the build failures is the length of all combined pipeline variables' names and values.

The following doc was shared:

* <https://confluence.atlassian.com/bbkb/troubleshooting-bitbucket-pipelines-1141505226.html#TroubleshootingBitbucketPipelines-scenario6>

If the length of all combined pipeline variables' names and values exceeds 120k, you will need to reduce them. Otherwise, you can reach out via the support ticket for further investigation.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Restrict git remote set-url
Asked by Alaa Dika:

I need to restrict the developers from changing the repository.

Can i restrict the git remote set-url command ?


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

I don't think there is a way to restrict this. What this command does is change the remote url that is present in the file .git/config inside a clone of a repo. If a user clones a repository on their computer, they will have permissions to change this file as well.

You could use a client-side pre-push hook to check if the remote url has been updated before pushing:

* <https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks>

These hooks though need to be stored in the .git/hooks directory inside each clone and they may also be deleted by a user.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Repo size is 3.75 GB in Bitbucket Cloud
Asked by Venkateswararao Karanam:

Hello Team,

We have a repo whose size is currently 3.75 GB. We deleted as many branches as possible but still few MB is freed up. We are nearing to 4 GB.

I need help. Please guide me.

Thanks in advance for the support.

Regards

Venkat


Answers:
author: Ben
body: G'day Venkateswararao!

I have executed a gc against the affected repository and this reduced the size from 3.8GB to 3.4GB.

For further size reduction, I would suggest checking large files in your repository and either converting them to LFS or deleting them from your repository:

*

  ```
  git rev-list --objects --all \
  | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
  | awk '/^blob/ {print substr($0,6)}' \
  | sort -r --numeric-sort --key=2 \
  | numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
  ```

* <https://support.atlassian.com/bitbucket-cloud/docs/use-bfg-to-migrate-a-repo-to-git-lfs/>
* <https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/>

If you still need further support - you will need to raise a support ticket. You belong to a Premium license workspace, and are therefore entitled to Premium support directly from our support team:

* <https://support.atlassian.com/contact/>

If you are unable to raise a ticket, please let me know your timezone so I can raise one on your behalf with the appropriate team in your timezone.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Venkateswararao Karanam
body: Hello Ben,

Thanks for your support and solution. We can see some you reduced the size from 3.8GB to 3.4GB.

We need some more help on this. Please raise a ticket on our behalf and kindly acknowledge after raising ticket.

Time : 02:00 PM IST to 04:00 PM IST

Date: 13-Aug-2024

Thanks,


author: Theodora Boudale
body: Hi Venkat,

I created a support ticket on your behalf. You should have received an email with the support ticket and you can also view the ticket here:

<https://support.atlassian.com/requests/>

Please share the repo URL in the support ticket for further investigation.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Restore Deleted Respository
Asked by Mayank Kumar:

Hi Support team,

I have by mistake deleted the wrong repository, how would I be able to restore it?

Does Bitbucket keep backups of the repository and can help me restore the code?


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

I checked the workspaces and repos you have access to, and I found one repository that was deleted by you yesterday.

I went ahead and restored this repository. Can you please check the workspace's repos and let me know if you can see it there?

Please note that the timestamp of the deletion has been added to the repository name. This is something you can change from **Repository settings**. The permissions on this repo are the same as before the repo's deletion.

Kind regards,  
Theodora


author: Daria Kulikova
body: Hello [@Mayank Kumar](/t5/user/viewprofilepage/user-id/5561548) ,

You may find the answer to your question in this article: <https://www.atlassian.com/trust/security/security-practices#service-availability>

Also, in this thread, it was said that if your Bitbucket repository was deleted within 7-day space, your data might be recovered: <https://community.atlassian.com/t5/Bitbucket-questions/Recover-Deleted-Repository/qaq-p/1805128> . But it's better to raise a ticket and contact the Atlassian Support team to find out if they can help: <https://support.atlassian.com/contact/#/>

In any case, it's better to have your own backup strategy, so that in such cases you are able to restore your data fast or even immediately. There are a few ways to back up Bitbucket - DIY scripts, Bitbucket Zero Downtime, or third-party backup tools. This article might be useful: <https://xopero.com/blog/en/best-bitbucket-backup-tools-for-secure-data-protection/>

Kind regards,

Daria


Tags: bitbucket-cloud

cloud
Create a repository from a template repository using REST APIS
Asked by Erick Narvaez:

Hello Everyone.  
Is it Posible to create a Repository form an existing one and bring all the folder and file structures? using jira administrative apis REST.


Answers:
author: Syahrul
body: G'day, [@Erick Narvaez](/t5/user/viewprofilepage/user-id/1577731)

We don't have a way to create a repository from Template either in UI or API. However, we do have an existing feature request that I highly suggest you keep an eye on:

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

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud
Bitbucket Cloud Pipeline IP Whitelisting
Asked by victor.mancipe:

I have set up a CI/CD pipeline in Bitbucket that deploys some artifacts to external servers which require an IP whitelisting in order to be reachable. I found [this article](https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/#Atlassian-IP-ranges) (in particular the *Atlassian IP ranges* section) on the Atlassian official documentation that lists the bitbucket outbound IPs to whitelist.  

This did not work as the remote systems are still unreachable even though we have whitelisted Bitbucket's IPs per instructions.  

There is [this troubleshooting article](https://confluence.atlassian.com/bbkb/troubleshooting-pipeline-ip-whitelisting-1209869206.html) on the matter that provides a command to run within the pipelines to find out the actual IP used by the build. It seems like IP is not consistent across runs as I got 44.202.220.85 in the first execution and 44.203.77.136 the second time. Surprisingly neither of the IPs in the results are listed in the whitelisting article which is confusing.  

Am I missing anything?  

Any help will be appreciated.


Answers:
author: Ben
body: Hi Victor!

As mentioned in our [documentation](https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/) - regular steps utilising 1x/2x step size will use a variety of Amazon Cloudfront IP addresses that can be found in this exhaustive list:

* <https://ip-ranges.amazonaws.com/ip-ranges.json>

You can filter this list down to us-east/us-west with the following command - all of these filtered addresses will need to be whitelisted:

```
curl https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.region=="us-east-1") | select(.service=="EC2") | .ip_prefix' 

curl https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.region=="us-west-2") | select(.service=="EC2") | .ip_prefix'?
```

Please let me know if further clarification is needed.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
execute local script from pipeline
Asked by benjamin:

Looking to execute a local script (with a parameter) from a pipeline.

Dont need the pipline to build the artifact, its already built.

Looking for a way to track which compiled code is getting pushed to production with a pull request that will pass a string parameter and execute a script on the local on-prem server.


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

You can use the ssh-run pipe to connect to your server via SSH and then run commands and/or a script on this server. This is the pipe's repo:

* <https://bitbucket.org/atlassian/ssh-run/src/master/>

If you scroll down, you will see the pipe's README with documentation and several examples using the pipe.

With regards to passing variables, you can pass variables that have been defined as Repository, Workspace, or Deployment variables:

* <https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/>

It is also possible to use a custom pipeline with variables that you provide during runtime, and pass the custom pipeline's variable:

* <https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/#Custom--manual--pipeline-variables>

If the server you are connecting to is behind a firewall, you will need to whitelist the IPs used by Bitbucket Pipelines build environments so that your server can be reached from the build:

* <https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/#Valid-IP-addresses-for-Bitbucket-Pipelines-build-environments>

Kind regards,  
Theodora


Tags: batch

bitbucket-cloud

cloud

execute

local

parameter

script
cannot upgrade bitbucket up to 5.X
Asked by Pavel Ryakin:

During migration from 4.X version to 5.0.2 we got sql error. Seems that tables in postgresql were renamed and it results in such errors - "insert or update on table "bb_pr_comment_activity" violates foreign key constraint "fk_bb_pr_com_act_comment"

How can we fix it

Full log Errors...

Caused by: liquibase.exception.DatabaseException: ERROR: insert or update on table "bb_pr_comment_activity" violates foreign key constraint "fk_bb_pr_com_act_comment" Detail: Key (comment_id)=(1) is not present in table "bb_comment". \[Failed SQL: (0) insert into bb_pr_comment_activity ( activity_id, comment_id, comment_action ) select activity_id, comment_id, comment_action from sta_pr_comment_activity\] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:397) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:83) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:151) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1279) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1261) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:661) ... 41 common frames omitted Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "bb_pr_comment_activity" violates foreign key constraint "fk_bb_pr_com_act_comment" Detail: Key (comment_id)=(1) is not present in table "bb_comment". at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2401) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:368) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:498) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:415) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:335) at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:321) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:297) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:292) at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94) at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:393) ... 46 common frames omitted


Answers:
author: Pavel Ryakin
body: resolved, there was data inconsistancy issue


Tags: bitbucket-data-center

data-center
I want to hide the list of projects in Bitbucket.
Asked by ??:

If I have user A and user B, and I don't want user B to see the project list, how do I set it up?


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

The visibility of projects depends on different settings.

* A public project will be visible in the project list to all workspace users, even if they don't have access to the project.
* All projects will be visible to users belonging in a user group that has the option **Can create projects** in this workspace enabled.

So, in order for a user not to see a certain project in the list:

* The project must be set to private.
* The user should not have any access to any repo in that project.
* The user must not belong to a group with the option **Can create projects in this workspace** enabled.

Please feel free to reach out if you have any questions!

Kind regards,  
Theodora


author: Seon Shakespeare
body: Hi [@??](/t5/user/viewprofilepage/user-id/5199529)

You can't hide the entire "project list" for specific users. However, you can control access at the individual project level.

To prevent User B from seeing a specific project, go to the project's settings \> Security \> Users and groups, and make sure User B is not listed.

You'll need to repeat this process for each project you want to hide from User B.

Hope this helps!

comments: author: ??
body: Thanks for the answer.  
I can't find the project's settings \> Security \> Users and groups you suggested, should I go to project's settings \> GENERAL \> Project permissions?


Tags: bitbucket-cloud

cloud
bitbucket OOM java heap space
Asked by Barak Nisim Sonino:

In production, Twice in the last week, we got OOM.

What is the default memory size that bitbucket start? We are using version 8.19

How to increase it?


Answers:
author: Barak Nisim Sonino
body: In the Atlassian docs, we found the following link:

[Memory](https://confluence.atlassian.com/bitbucketserver0819/scaling-bitbucket-data-center-1416826864.html)

Specific:   
"Bitbucket Data Center has been designed to have fairly stable memory usage. Pages that could show large amounts of data (e.g. viewing the source of a multi-megabyte file) perform incremental loading or have hard limits in place to prevent Bitbucket Data Center from holding on to large amounts of memory at any time. In general, the default memory settings (`-Xmx1g`) should be sufficient to run Bitbucket Data Center. Installing third-party apps may increase the system's memory usage. **The maximum amount of memory available to Bitbucket Data Center can be configured in****`_start-webapp.sh`."**


Tags: bitbucket-data-center

bitbucket-server

data-center

server
Can't log into my Bitbucket account
Asked by Miko?aj Kuik:

I'm getting this message, no matter browser, device or network I try:  

We couldn't log you in  
You may run into this issue when you use specific browsers or add-ons that hide the referer header for id.atlassian.com and other Atlassian sites. Check for these and then try logging in again.


Answers:
author: Mark C
body: Hi [@Miko?aj Kuik](/t5/user/viewprofilepage/user-id/5560039)  

Welcome to the community.  

I can see that your Bitbucket Cloud account was marked as a dormant account due to not logging in to Bitbucket.org for a long period of time.  
I went ahead and reactivated it and you should be able to log in now.  

Let me know how it goes.  

Regards,  
Mark C

comments: author: Miko?aj Kuik
body: Hello [@Mark C](/t5/user/viewprofilepage/user-id/1210823)

**Thank you.** For sure it helped, now I am able to log in to Bitbucket and manage some workspaces/repositories. **Unfortunatelly, still not able to clone repository** (from command line). Getting "Invalid credentials" error. Tried to change password but it didn't help...


author: Mark C
body: Hi [@Miko?aj Kuik](/t5/user/viewprofilepage/user-id/5560039)  

Could you confirm if you are using an [App password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/) as your password credential?  
If not, could you try to generate one and use it as your password?  

Let me know how it goes.  

Regards,  
Mark C


author: Miko?aj Kuik
body: Yes, I'm using App password (and it works) but isn't it workaround? Not really convenient solution while working with command line.


author: Mark C
body: Hi [@Miko?aj Kuik](/t5/user/viewprofilepage/user-id/5560039)  

Unfortunately, the Atlassian password is now deprecated to be used for API and Git authentication, all customers must now use an [app password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/) or [access tokens](https://support.atlassian.com/bitbucket-cloud/docs/access-tokens/) when authenticating to Bitbucket Cloud Git or API.

You can check this blog post for more information: [Deprecating Atlassian account password for Git and Bitbucket API activity](https://bitbucket.org/blog/deprecating-atlassian-account-password-for-git-and-bitbucket-api-activity)  

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
I lost ALL MY REPOS from my personal account
Asked by Fellipe Souto Sampaio:

I've been a Bitbucket user for the past 10 years. I usually stored some very important academic and professional projects in my account, as a redundancy for github.

Today I tried to loggin in my main account and for my surprise ALL MY REPOS vanished. I don't undestand where they go, but this is a totally nightmare and terrible way to deal with user most value data, our repos. I would like to ask for Atlassian to deal with that, I never losed a single bit of data in Github for the past 10 years, and I would like to have the same level of quality, we pay for this level of service, and WE PAY VERY WELL. If isn't possible to recover I would like to know WHY, this kind of problem is a totally disrespect with the end user.

I'm very pised off because of this, and to clarify:

- I already searched everywhere

- I'm using the correct accounts

- I know what I'm doing, I'm not a novice programmer

I'll wait for a proper help from Atlassian to solve this, I really hope not to involve my lawyer in this kind of stupid problem.

Thanks.


Answers:
author: Syahrul
body: G'day, [@Fellipe Souto Sampaio](/t5/user/viewprofilepage/user-id/5559958)

Welcome to the community!

You might have lost access to the repository for several reasons, but I can assure you that we don't delete them. I'll do my best to assist you.

To start, could you please provide the name of the missing workspace?

Additionally, have you tried accessing your workspace using [this link](https://bitbucket.org/account/workspaces/)? Once there, select the workspace you can access and click on the "Repositories" tab at the top to see if all the repositories are listed.

Let me know how it goes.

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud

data-loss

github

sla

source-code
how do I query endpoints that don't suport query language?
Asked by Dylan Landry:

The bitbucket API docs describe a querying language and mention that only *some* endpoints support it. I think I just spent an hour trying to use the pipelines/ endpoint with that query language. I'm starting to think it doesn't support it.

I looked at the linked open api spec and it doesn't include query parameters for the list pipelines endpoint. If the pipelines endpoint doesn't support the query language, how am I supposed to learn how to query it?

EDIT: I found this related question without an answer: [How can I see all parameters for a REST API resource?](https://community.atlassian.com/t5/Bitbucket-questions/How-can-I-see-all-parameters-for-a-REST-API-resource/qaq-p/2011279)


Answers:
author: Theodora Boudale
body: Hi Dylan and welcome to the community.

For API endpoints that don't support filtering, you can get the response from the API call and then use another tool that filters JSON data to filter it.

jq is an example of such a tool:

* <https://jqlang.github.io/jq/>

Kind regards,  
Theodora


author: David Bakkers
body: Hello [@Dylan Landry](/t5/user/viewprofilepage/user-id/5560014)

The pipelines endpoint of Bitbucket Cloud currently doesn't support filtering.

Refer to [BCLOUD-14000](https://jira.atlassian.com/browse/BCLOUD-14000)


Tags: api

bitbucket-cloud

cloud
What API endpoints support the SQL-like querying language?
Asked by Dylan Landry:

The bitbucket API docs describe a querying language and mention that only *some* endpoints support it. Can we get a list of which ones?

I think I just spent an hour trying to use the pipelines/ endpoint with that query language. I'm starting to think it doesn't support it.


Answers:
author: David Bakkers
body: > *"Can we get a list of which ones"*

Nope. It's a common gripe that Bitbucket devs have about the API documentation.

In your [other post](https://community.atlassian.com/t5/Bitbucket-questions/how-do-I-query-endpoints-that-don-t-suport-query-language/qaq-p/2774859) you said *"I looked at the linked open api spec and \[that endpoint's documentation\] doesn't include query parameters"*... and that's the easiest way of knowing if an endpoint does or doesn't support querying.


Tags: api

bitbucket-cloud

cloud