youngmon/atlassian-qna huggingface dataset:
How to remove a Workspace that was deleted from my Workspace list?
Asked by franciscojaceval:

First of all, it's very annoying to being redirected to a community when help site tell me that i can create a ticket. Second, My list of workspaces have a workspace that doesn't exists anymore, and when I try to Leave it, it show a 404 error. How can I remove that workspace from my profile definitely?


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

I reviewed the workspaces that your account has access and for one of them the membership was out of sync. I went ahead and triggered a synch for that particular workspace and it correctly updated your access, so you should not be seeing that workspace in your profile anymore.

Could you confirm if everything looks good on your end now?

Also, since you have access to a workspace with an active subscription, you should be able to create a support ticket with us by accessing <https://getsupport.atlassian.com/> , selecting Bitbucket Cloud, and providing the **workspaceID** that has the Standard/Premium plan.

Thank you, [@franciscojaceval](/t5/user/viewprofilepage/user-id/5241548) !  
Patrik S

comments: author: franciscojaceval
body: It did fix my problem, thank you!


Tags: bitbucket-cloud

cloud
How to add snapshot in readme file
Asked by Venkatesh Dhanapalraj:

How to add snapshot in readme file


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

My understanding is that you would like to add a screenshot to the readme.md file in the repository.

If this is the case, you can use the [markdown syntax](http://daringfireball.net/projects/markdown/) to add images to the file, depending on where the image is stored :

* If the image is **stored in a folder of your repository** , you can add the following section in your readme file

  ```
  ![Alt text](myimages/image1.jpeg)
  ```

  This example considers the image named image1.jpeg is stored in a folder called **myimages** within your repository  

* If the image is stored in an **external host** :

  ```
  ![Alt text](http://www.addictedtoibiza.com/wp-content/uploads/2012/12/example.png)
  ```

You can find more examples of using the markdown syntax in the README file of the following tutorial repository :

* <https://bitbucket.org/tutorials/markdowndemo/src/master/README.md>

Thank you, [@Venkatesh Dhanapalraj](/t5/user/viewprofilepage/user-id/5241272) !

Patrik S


Tags: bitbucket-cloud

cloud
"Unable to locate package php8.1" error when trying to install PHP in pipeline script
Asked by Support:

So I'm trying to deploy a Wordpress plugin to a WPEngine-hosted website using Bitbucket Pipelines.

I'm using WPEngine's pipe: <https://bitbucket.org/wpengine/wpe-site-deploy/src/main/pipe.yml>

I need to run "composer install" to install PHP dependencies before the pipe runs.

Here's my bitbucket-pipelines.yml:

```
pipelines:
  branches:
    master:
      - step:
        name: Deploy to Development
        script:

          - apt update && apt -y upgrade
          - apt -y install language-pack-en-base
          - export LC_ALL=en_US.UTF-8
          - export LANG=en_US.UTF-8
          - apt -y install software-properties-common
          - add-apt-repository --yes ppa:ondrej/php
          - apt update
          - apt -y install php8.1
          - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
          - composer install
          - pipe: wpengine/wpe-site-deploy:v1
            variables:
              WPE_SSHG_KEY_PRIVATE: $WPE_SSHG_KEY_PRIVATE
              WPE_ENV: 'xxx'
              REMOTE_PATH: 'wp-content/plugins/xxx/'
```

Everything is running swimmingly until the part where it tries to install php8.1:  

    Reading state information...
    E: Unable to locate package php8.1

`But the repository was added without issues:`  
![error.png](https://community.atlassian.com/t5/image/serverpage/image-id/262644i423339C9A772BCDC/image-size/large?v=v2&px=999 "error.png")  
Above you can see successful adding of ppa:ondrej/php and apt update completed. But somehow it still can't find PHP 8.1  
Can anyone help me out with this ?


Answers:
author: Support
body: Answering my own question.

Turns out WPEngine by default already has Composer installed.

So I don't actually have to install and setup composer BEFORE their Pipe runs.

I can have a bash script in my source code which runs "composer install", and have this script run AFTER the pipe completes, like so:  

```
pipelines:
  branches:
    master:
      - step:
          name: Deploy to Development
          script:
          - pipe: wpengine/wpe-site-deploy:v1
            variables:
              WPE_SSHG_KEY_PRIVATE: $WPE_SSHG_KEY_PRIVATE
              WPE_ENV: 'xxxx'
              REMOTE_PATH: 'wp-content/plugins/xxxx/'
              SCRIPT: 'bitbucket-pipelines-post-deploy.sh'
```


Tags: atl-pipelines

bitbucket-cloud

bitbucket-pipelines

cloud
Atlassian Access doesn't showing Bitbucket as Product to setup SSO
Asked by V Mahesh:

Hi

Am trying to setup SSO for Bitbucket Cloud using Atlassian access but am Bitbucket is not showing as product in that only Jira and Confluence is showing. Please help me with below query also

What does Atlassian support in terms of user management in Bitbucket, for example: Can specific users without SSO be granted access to certain repos in Bitbucket, with automatic account de-activation after some time.


Answers:
author: Syahrul
body: G'day [@V Mahesh](/t5/user/viewprofilepage/user-id/5240755) and welcome to the community!

Bitbucket is currently in the process of being fully integrated with Atlassian Access: [Roadmap](https://www.atlassian.com/wac/roadmap/cloud/shared-user-management?category=&p=dbe4af1e-48) . However, as of now, it is not yet fully integrated. This means that you will still need to manage Bitbucket users separately within the Bitbucket platform.

Regarding your question, you can grant access to someone outside of your organization to a repository in Bitbucket. However, since the account is not part of your organization, you won't be able to deactivate it. That said, you can remove the user's access from your repository, which should effectively prevent them from accessing it.

Let me know if you have any additional questions.

Cheers,  
Syahrul

comments: author: Mahesh Vecham
body: [@Syahrul](/t5/user/viewprofilepage/user-id/744536) Thanks for the information.


Tags: bitbucket-cloud

cloud
Reaching one repository to another one
Asked by Aysu Saglam:

Hello, i have two repositories, one repository includes codes, another one is includes just one script. I want to reach to code repository from script repository. My request url  
url = f'<https://api.bitbucket.org/2.0/repositories/{repository_owner}/{repository_name}/commits>'.  
But i am getting 404 errors wit auth or api token. Could anyone knows what is wrong with that?


Answers:
author: Ben
body: Hi Aysu!

I will need a bit more context as to where you are attempting this (ie in Pipelines) and what you wish to achieve.

If you're trying to clone from another repository in Bitbucket Pipelines, I would suggest reading through this article:

* <https://bitbucket.org/blog/cloning-another-bitbucket-repository-in-bitbucket-pipelines>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
When I login into my bitbucket account I get error
Asked by Alexandr Pumnea:

Something went wrong

While we check things on our end, try refreshing the page. If reloading the page doesn't help, check our status page for known incidents or planned maintenance.

If you are still experiencing issues, our support team can be reached via StatusPage. Use the code below when reporting your issue, this will help the team look up details of what went wrong:

7826c0a2283b49d4b93d2ff0a9c6420![Screenshot_20230612_021646_Chrome.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/262583iC0B68A3E0FF5B50F/image-size/large?v=v2&px=999 "Screenshot_20230612_021646_Chrome.jpg")


Answers:
author: Syahrul
body: G'day, [@Alexandr Pumnea](/t5/user/viewprofilepage/user-id/5240541) and welcome to the community!

Please try logging in from a desktop browser to see if the issue is reproducible. This will help us determine if the problem is specific to mobile devices.

If you encounter any difficulties logging in from the desktop, please let me know. In that case, we may need to conduct further investigation to identify the root cause of the problem.

Cheers,  
Syahrul

comments: author: Alexandr Pumnea
body: Hey, [@Syahrul](/t5/user/viewprofilepage/user-id/744536)   

The problem is not specific to mobile devices.  
I get the same error page on desktop browsers: Chrome, Safari, and Arc.

![Screenshot 2023-06-13 at 07.10.04.png](https://community.atlassian.com/t5/image/serverpage/image-id/262796i5A43E0B5935894D9/image-size/large?v=v2&px=999 "Screenshot 2023-06-13 at 07.10.04.png")  

`This is the code for issue reporting f2f848841a3741da81fd29621fe83762`


author: Syahrul
body: Thanks [@Alexandr Pumnea](/t5/user/viewprofilepage/user-id/5240541)

I believe this happens because you've deleted your personal workspace, which caused the redirection to try to redirect you to a no longer existing workspace.

Now can you try to log in again but instead open the following URL directly after it failed and let me know if that helps:

<https://bitbucket.org/account/workspaces>

Let me know if that works.

-  
Syahrul


author: Alexandr Pumnea
body: Thanks a lot. That helped.


author: Juan Camilo Alvarez Romero
body: hi [@Syahrul](/t5/user/viewprofilepage/user-id/744536) ![Captura.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/268050i48128EE26F3DB6DE/image-size/large?v=v2&px=999 "Captura.PNG")  
I have the same problem and I open the url and I still have the problem


Tags: bitbucket-cloud

cloud
How to restrict pipeline to get launch by individual user or groups.
Asked by yosser_mahfoudh:

Hello,

How I can restrict permission to a group of users to run the pipeline?

I want only the admin people able to run it?


Answers:
author: Aron Gombas _Midori_
body: You can't restrict a pipeline, but you can restrict deployments. If your use case is to allow a pipeline that would deploy to production, for example, then it is doable! (Although this is a Premium feature.)

See: [https://community.atlassian.com/t5/Bitbucket-questions/How-to-restrict-pipeline-trigger-access-for-individual-user-or/qaq-p/1966957#:\~:text=You%20cannot%20restrict%20a%20Pipelines,can%20trigger%20a%20Pipelines%20build](https://community.atlassian.com/t5/Bitbucket-questions/How-to-restrict-pipeline-trigger-access-for-individual-user-or/qaq-p/1966957#:~:text=You%20cannot%20restrict%20a%20Pipelines,can%20trigger%20a%20Pipelines%20build).


Tags: bitbucket-cloud

cloud
where is my data???
Asked by alessandro vitari:

i reconnect bitbucket after a while and i've lost all my previous work.  


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

I see the bitbucket account associated with the email address you posted this question was created 2 days ago, so I suspect might have tried to log in with the wrong email and ended up creating a new account.

In this case, I would suggest trying to log in with any other email you own to check if it has an existing Bitbucket account associated with it and if your repositories are present on that account.

Thank you, [@alessandro vitari](/t5/user/viewprofilepage/user-id/5240496) !

Patrik S


author: midaroh
body: Did you figure this one out? I have the same issue. I have a free account but I have been actively using it. My prior login was maybe a few months ago, and I have been doing git pull/push regularly. Under the same user I don't see any repositories in that tab, and when I go projects \> click project I see no repository there either. Though I can still git pull/get.


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

Did you leave your Bitbucket for a long time? And not pay the bill because you were not using it? Atlassian will shut down accounts that are unpaid and unused (although they do send a lot of email to the owner when stuff is not active)


Tags: bitbucket-cloud

cloud
How to actually reduce size of my repository?
Asked by jolaf:

My private repository got just over 4 GB in size. I followed the instructions at <https://support.atlassian.com/bitbucket-cloud/docs/use-bfg-to-migrate-a-repo-to-git-lfs/> and moved 700 MB of my large files to LFS. Now my repository is 7.3 GB in size and I still can't push any new commits. I don't know what to do. How can I fix this? Thanks!


Answers:
author: jolaf
body: I've managed to resolve my problem by creating a new repository and pushing updated content there, then removing the old repository and renaming a new repository into old one.


Tags: bitbucket-cloud

cloud
Can't see repositories when logged in using Gmail
Asked by Oyeme:

Hi all,

I have multiple private personal projects and repositories created with a simple registration using email.

I tried to log in today using Gmail authentication. However, when I log in using Gmail authentication I don't see my projects at all. I can see only other friends' projects. It's completely empty. After an hour of investigation and pain, I logged in using my username and password so I can see my projects.

I use one email, and using email \& password it list of repositories shows up, using Gmail the list of repositories and projects are not showing up


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

Could you please confirm if the email you used to log in with Google and didn't see your repositories, and the email which you directly logged in to Bitbucket and was able to see your repositories were the same email?

Also, when logging in with Google, could you please confirm you are looking at the right workspace that has your repos? You can change the workspace by clicking on your personal avatar in the top right and selecting the **All workspaces** option.

Thank you, [@Oyeme](/t5/user/viewprofilepage/user-id/5240065) !

Patrik S

comments: author: Oyeme
body: Yes, the email is the same. I can see the shared workspace, but I don't see my workspace and my repositories.


author: Patrik S
body: Hello [@Oyeme](/t5/user/viewprofilepage/user-id/5240065) ,

I will raise an internal support ticket using the email you have posted this question, so we can investigate further. You should receive an email with the ticket link soon. In case you don't receive it, please let me know, so I can share the ticket link with you here (it's only visible to you and Atlassian staff).

Thank you, [@Oyeme](/t5/user/viewprofilepage/user-id/5240065) !

Patrik S


author: rumschuettel-new
body: I also experienced something similar, although for me it appears as if this account that I'm writing from uses the same e-mail address as the one of my original account (rumschuettel), and I cannot see the old repositories through it.

Unlike you, however, I can't even log into my old account anymore.


Tags: bitbucket-cloud

cloud
How to allow access token to push to restricited branches?
Asked by Davide Bizzarri:

I'm automating repository updates using an access token, I have an email and name for the token, but I'm not able to add it to the users allowed to push to the restricted branch.

How can I solve this problem, and allow access tokens to push to restricted branches?


Answers:
author: Theodora Boudale
body: Hi Davide,

I'm afraid that it is not possible to add an access token to branch restrictions at the moment.

We have a feature request to support this:

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

Please make sure to add your vote to it (by selecting the **Vote for this issue** link) and add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates. Any updates will be posted in that feature request.

In the meantime, you would need to set up access with the credentials of a user that is allowed to push to the branch.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Not mirroring Bitbucket repo to GitHub
Asked by Tom?k:

This is my code in pipeline:  

`- step: ``name: Sync GitHub Mirror`

`image: alpine/git:1.0.26`

`services:`

`- docker`

`script:`

`- git remote add github "git@github.com:[yourname]/[your repo].git"`

- `git checkout $BITBUCKET_BRANCH`

`- git pull`

`- git push github $BITBUCKET_BRANCH`

But pipeline failed:  
+ git push github $BITBUCKET_BRANCH

Warning: Permanently added the ECDSA host key for IP address '140.82.114.4' to the list of known hosts.

remote: fatal: did not receive expected object 205375ad4df64d611dcd802c66cad202f89b5370

error: remote unpack failed: index-pack failed

And `aslo i dont fetch` fingerprint to host addres (github.com) in ssh known hosts in setting project:  
Bad request  
The request body contains invalid properties  

Where is problem and how is solutions. Thanks.


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

Just to give you some context, Pipelines builds run in Docker containers. For every step of your build, a Docker container starts (the build container) using the image you have specified in your bitbucket-pipelines.yml file. If you use a service for a step, then a second Docker container will start for the service which will share a network adapter with your build container. The repo is cloned in the build container, and then the commands of the step's script are executed. When the step finishes these Docker containers get destroyed.

By default, the git clone operation will use a depth of 50, so only the last 50 commits will be cloned. If the GitHub repo you want to push to is empty, then the error shows because it is not possible to push from a shallow clone to a new, empty repo.

You can use the following on your step so that all the commits of the branch will get cloned (this is the [documentation](https://support.atlassian.com/bitbucket-cloud/docs/git-clone-behavior/#Depth) on the clone depth):

```
clone:
  depth: full
```

After you run the first pipeline, you can remove this.

<br />

You could also push first the main branch of your repo to the GitHub repo from a local clone, and then your pipeline should work without the need to edit the bitbucket-pipelines.yml file to add and remove the depth option.

<br />

The command git checkout $BITBUCKET_BRANCH in your script is not necessary, as when you run a pipeline on a branch, this specific branch will already be checked out.

<br />

Bitbucket Pipelines automatically adds the fingerprint for the Bitbucket and GitHub sites to all pipelines (but doesn't display that in the UI), so there is no need to add the fingerprint.

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

Kind regards,  
Theodora


author: Aron Gombas _Midori_
body: In the URL you are using, you need to enter your GitHub username and repo name, so that the URL becomes a working absolute URL without placeholders:

```
git@github.com:[yourname]/[your repo].git
```


Tags: bitbucket-cloud

cloud
How can I get / create an environment branch restriction through REST API?
Asked by Fran?ois Collins:

Hi, after creating a deployment environment, how do I set which branch pattern can deploy to it? I see in the doc that I can create environment variables, but no mention of what would show up in the UI as "**Branches allowed to deploy to X".**


Answers:
author: Fran?ois Collins
body: Never mind. I kept searching using different keywords and finally found that it isn't supported: <https://jira.atlassian.com/browse/BCLOUD-21703>


Tags: bitbucket-cloud

cloud

rest-api
Bitbucket pull requests show previously committed changes that don't apply
Asked by Will:

With one of our repos, when we create pull requests to merge our develop branch to a release branch, we always see a lot of extra code changes that were already previously committed to develop, which we do not see when we compare branches at the command line with "git diff develop release-x.x.x"

Could this be a known bug in bitbucket or is this a common occurrence if there is an incorrect setting in our repo?


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

The command you are using is equivalent to a two-dot diff:

```
git diff develop..release-x.x.x
```

This takes into account changes in both branches.

Pull request diffs in Bitbucket Cloud are using a three-dot diff instead:

```
git diff develop...release-x.x.x
```

A three-dot diff shows only changes in the source branch starting at a common ancestor of the two branches.

Documentation on Git Diff: <https://git-scm.com/docs/git-diff>

We changed the algorithm we use in pull request diffs last year:

* <https://bitbucket.org/blog/improving-performance-on-complex-diffs>

If you want to see changes to the destination branch in the diff, you can merge the destination branch into the source branch.

We have a feature request to provide the preview-merge diff type (that we were previously using) on demand that you can vote for:

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Please fix errors below - there aren't any errors!
Asked by xni06:

I'm trying to move a repository from one project to another - I've successfully done this on many occasions but for this particular repo I'm greeted with the following message, yet there are no errors on the page :-/

\<screenshot_removed\>


Answers:
author: Theodora Boudale
body: Hi [@xni06](/t5/user/viewprofilepage/user-id/10170)

Could you please do the following on your browser:

1. Navigate to the repo's **Repository settings**
2. Open **Developer Tools** on your browser
3. Select the tab **Network**
4. Try to change project for the repo and **Save changes**to reproduce this error
5. In the tab **Network**, look if there is a request with 4xx or 5xx error, and if so, select it
6. In the **Headers** tab, look for a field named **x-sentry-id**
7. Could you please provide the value for the field **x-sentry-id**, so I can look it up in our system? That could give me some additional details on why the error occurs.

Just a heads up, I removed the screenshot from your post, as it shows details like workspace name and repo name, to protect your privacy.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
How to add a Table in PR description as default?
Asked by sathiyaprakash.rangaraju:

I need to add a Table with more than 2000 lines that i could add in PR description, but I want it to appear default when i try to create PR


Answers:
author: Aron Gombas _Midori_
body: If there is a 2000 character limit to the PR description field, then you will *not* be able to add a hyper-long table there.

As a workaround, what you could do is storing the table elsewhere (Confluence page? Jira issue description or comment?) and link to that location using a link in the PR's description.


author: Erez Maadani
body: Hi [@sathiyaprakash.rangaraju](/t5/user/viewprofilepage/user-id/5238839)

Try adding it to the default description under repo settings -\> pull requests -\> Default description.

comments: author: sathiyaprakash.rangaraju
body: Tried that but can't be able to add table in default description. If converted to markdown table, number of characters increased 3 times from the original table but only 2000 characters is allowed to be added.


Tags: bitbucket-cloud

cloud