youngmon/atlassian-qna huggingface dataset:
how to force Bitbucket dashboard session logout after x time of inactivity.
Asked by Diju S Nair:

We are upgrading BBDC from 6.9 to 8.9 and as per the security recommendation we need to implement the session timeout to 15 min.  
We have removed the "keep me logged in" and impemened "server.session.timeout" to 15 min, but it only logs out if the browser is closed and if the browser/Tab is open(without any activity), it will not log out even after 15-20 min.  
Can i know if there is any solution for this?


Answers:
author: Victor Menes
body: Hey Diju,

Thank you for submitting your doubt here :)

I will try to give you useful information so you could get this sorted out. Below are a couple possible causes for the issue you've reported. Additional information can be found here as well - [Bitbucket Server Session does not expire after configured timeout](https://confluence.atlassian.com/bitbucketserverkb/bitbucket-server-session-does-not-expire-after-the-configured-timeout-858780629.html)

* The login screen might have the "remember me" checkbox marked.
* If using clustering, each node has it's own web.xml and changes may not be in sync.
* The load balancer has session affinity enabled
* The user may be active the entire time which will cause them to not be logged out

Would you be able to take a look on these and see if that helps?


Tags: bitbucket-server

server
Connect JupyterLab notebook on Google Cloud Platform to BitBucket repository
Asked by Pradeep Varanasi:

Hi,

I have Python code files running in jupyterlab on the Google Cloud Platform and would like to create/push the code to a company-managed BitBucket repository.

Any architecture/workflows/training documents would be helpful in establishing the connection.

Regards,  
Pradeep


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

Atlassian doesn't have an integration that can do this. However, I see that Google Cloud Platform has documentation on how to save a notebook to GitHub:

* <https://cloud.google.com/vertex-ai/docs/workbench/user-managed/save-to-github>

It may be possible to use the steps outlined in this document in order to save the notebook to a Bitbucket repo, instead of a GitHub repo. I haven't tested this and I'm not sure if it will work, but you can give it a try (you could reach out to the support team of Google Cloud Platform to make sure).

If you read the document and if you have any questions about how any of the steps listed for GitHub can be performed in Bitbucket Cloud, please feel free to let me know. I will provide below some links about authentication in Bitbucket Cloud:

* If you need to provide credentials for your Bitbucket account, you can use your username (found here: <https://bitbucket.org/account/settings/>) and an app password <https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/>
* If you want to use SSH, you can add the public SSH key to the settings of your account by following the steps here: <https://support.atlassian.com/bitbucket-cloud/docs/set-up-personal-ssh-keys-on-linux/#Provide-Bitbucket-Cloud-with-your-public-key>

Kind regards,  
Theodora

comments: author: Pradeep Varanasi
body: Hi Theodora, thanks a lot for taking the time to answer the question. This is really helpful info. Let me try to replicate the scenario on my end.


author: Theodora Boudale
body: Hi Pradeep.

You are very welcome, please feel free to let me know if you need anything further.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

google
Unable to locate my private repositories on Bitbucket
Asked by Antony Repin:

Dear Atlassian Support,

I am writing to you with concerns regarding my private repositories on Bitbucket. I have been a Bitbucket user since around 2010. I had nearly 10 private repositories on this account, I can recall some names.

However, in recent years, I rarely logged in to Bitbucket, and when I did, I only needed some of those repositories.

My main concern is that after Atlassian's global upgrade of services, I cannot find my private repositories under that account. However, I am now confused as to why one of my accounts is locked at all without any notice that I could find in the relevant inbox.

As a long-time user of Bitbucket, I would appreciate any assistance you can offer in locating my private repositories. Please let me know if you require any further information from me to assist with your investigation.

Thank you for your attention to this matter.


Answers:
author: Theodora Boudale
body: Hi Antony,

The email address of your community account is an email alias to a Bitbucket Cloud account and not the primary email. Any notification about the deactivation of this account should have been sent to the primary email address of the account.

If you haven't received any notification via email, please navigate to <https://www.atlassian.com/company/contact/general-inquiries> and raise a request under '*Help with my Account*'. Ensure you include the email of the account impacted and any sites/products they would have had access to.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Not able clone my repository
Asked by shehinn11:

when iam tryng to clone my repo its asking me to login to atlassian, but when im trying to login its showing that invalid credentials but when i tried to login into atlassian through web using the same credentials i was able o login.


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

We have deprecated the use of account passwords for Git over HTTPS and API:

* <https://community.atlassian.com/t5/Bitbucket-articles/Announcement-Bitbucket-Cloud-account-password-usage-for-Git-over/ba-p/1948231>

Your account's password can be used only for logging in to <https://bitbucket.org/> from browser. If you want to clone, pull, or push to a repo with HTTPS, you can generate an app password for your account and use that instead of a password (in combination with your username):

* <https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/>

Could you give it a try and let me know how it goes?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Delete/Pass an In-progress build in bitbucket which is already deleted from Jenkins pipeline.
Asked by Sumnesh Lakhiwal:

Hi All,

I had a build in Jenkins for example #732. The build got successful in Jenkins but Jenkins unable to notify bitbucket due to some network issue.

Now, in bitbucket, that build(#732) is still going on and on and showing in progress. Due to which I am not able to merge my other changes to the branch because on each new PR raised the bicbucket is picking the same failed build (#732) and expecting to be successful. Since we are showing only last 5 builds in the Jenkins list and remove the older builds from the list, the build #732 is not availale now.

In the above scenario, is there any way to delete the in progress (#732) build from bitbucket?

I tried below URL to resolve it. But it would create a new buid with the respective commit id, but not doing anything related to stucking build, the build #732 in my case.

<https://developer.atlassian.com/server/bitbucket/how-tos/updating-build-status-for-commits/>

Please help.


Answers:
author: Erez Maadani
body: Hi [@Sumnesh Lakhiwal](/t5/user/viewprofilepage/user-id/5213465)

The given URL will help you mark the build as successful.

Are you sure you've used the same key and same commit?

You can use this API to fetch the builds for a specific commit: <https://developer.atlassian.com/server/bitbucket/rest/v810/api-group-builds-and-deployments/#api-api-latest-projects-projectkey-repos-repositoryslug-commits-commitid-builds-get>


Tags: bitbucket-server

server
How can I modify file and push to my branch by RestApi v2
Asked by Suhaib Baba:

I'm trying to modify some files and push them to the \`test\` branch. I didn't find something in the documentation. can you please anyone tell me how can I do that? and can I push multiple files? (not I'm talking about Bitbucket rest APIv2, not Bitbucket server)


Answers:
author: Aron Gombas _Midori_
body: As you write about REST API, I guess you're trying to programatically push commits to a remote Bitbucket Cloud repo.

If so, then do **NOT** use the REST API for that!

Programatically clone the repo, then work on the local clone and push changes. You can use the git commandline client for that (or other client libraries that are available for all major programming languages). You would basically work with the Git tool in your program just like a human user.

comments: author: Suhaib Baba
body: Thanks [@Aron Gombas _Midori_](/t5/user/viewprofilepage/user-id/502447) , BTW I found this documentation to do that

[Push code to repo by Rest Api. It's very helpfull](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-source/#api-repositories-workspace-repo-slug-src-post)


author: Aron Gombas _Midori_
body: Oh, I didn't know about this approach. Interesting, thanks.

(I am not sure though if I used the REST API to do this if I had the option of using the Git client.)


author: Suhaib Baba
body: [@Aron Gombas _Midori_](/t5/user/viewprofilepage/user-id/502447) yes but if you have big projects and you need something to work on all of these projects like webhook. git clone will be very expinsive


Tags: api

bitbucket-cloud

cloud

rest-api
Stopped receiving email notifications
Asked by tpiech:

Hello,

Like many other posts here, my team stopped receiving email notifications for JIRA and Bitbucket recently, likely due to being on the email suppression list. Is it possible to take us off this list?

Thanks.


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

There were several email addresses from the domain of your email address in our suppression list. I went ahead and cleared all of them.

Could you please keep an eye and let me know if you and your team can receive notifications now?

Kind regards,  
Theodora

comments: author: tpiech
body: Thank you, [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086)!

The notifications are now coming in.


Tags: bitbucket-cloud

cloud
Pipeline Failed due to system error
Asked by Naveen Sivakumar:

I am getting 'java.io.FileNotFoundException' error in the bitbucket pipeline while running cypress script at different areas. I tried to troubleshoot the issue but that not helps. What could be the root cause of the issue and how to resolve that.  

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


Answers:
author: Thomas Einwaller
body: seeing the same in my builds very often - any solution or hint?


author: Aron Gombas _Midori_
body: What do you see in the right-side "Build" panel (the large one with black background)? Are there any further details shown there?

comments: author: Naveen Sivakumar
body: Sorry for the delayed response \[I missed out the Reply\]. There is nothing unsual in the right-side "Build" panel.

* At some point the execution got freezed and the area where it got freeze also gets varies.
* There is no error in the script level aswell.


Tags: bitbucket-cloud

cloud
Why do I need a "full Git clone" when deploying to Heroku?
Asked by Bruno Zica:

Hi,

The documentation on page <https://support.atlassian.com/bitbucket-cloud/docs/deploy-to-heroku/> says the following:

*Heroku deployments require a full Git clone. By default, Pipelines clones your repository with a depth of 50 to shorten your build time. You can configure your Pipeline to do [a full Git clone](https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html#Configurebitbucket-pipelines.yml-ci_clone) in your bitbucket-pipelines.yml file.*

I don't understand why do I need a "full Git clone".  

Bitbucket only needs to create a tgz with the source code and send that package to Heroku. The tgz should not contain the ".git" directory because it has no use for Heroku. Heroku only needs the source code.  

So, why a "full Git clone"?


Answers:
author: Ben
body: Hi Bruno,

We are not entirely sure of this to be honest. Heroku is a third-party application and based on previous troubleshooting - does not accept an outbound connection properly when deploying without a full clone.

I would suggest reaching out to Heroku support for this enquiry:

<https://www.heroku.com/support>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud

heroku
How To CI CD Pipeline
Asked by ebyantoo:

How To CI CD Pipeline With Bitbucket


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@ebyantoo](/t5/user/viewprofilepage/user-id/5213179) and welcome,

please read the following documentation <https://support.atlassian.com/bitbucket-cloud/docs/get-started-with-bitbucket-pipelines/> in order to figure how to setup a pipeline within Bitbucket.

Fabio

comments: author: ebyantoo
body: can bitbucket pipeline using notification google chat [@Fabio Racobaldo _Herzum_](/t5/user/viewprofilepage/user-id/781528)


author: Fabio Racobaldo _Herzum_
body: there is an app for that [https://marketplace.atlassian.com/apps/1220456/atlas-hangouts-chat-bot-for-bitbucket?hosting=cloud\&tab=overview](https://marketplace.atlassian.com/apps/1220456/atlas-hangouts-chat-bot-for-bitbucket?hosting=cloud&tab=overview)


author: ebyantoo
body: how to integrate with other repositories like the helm-chart repository (place file of service yaml) in the pipeline?


Tags: bitbucket-cloud

cloud
Cannot access my account push, fetch stopped working
Asked by Ben Goldenberg:

Suddenly I cannot push or fetch

I have the correct ssh keys in my developer settings,

but it sopped working, it used to work.

I am getting an error:

The requested repository either does not exist or you do not have access. If you believe this repository exists and you have access, make sure you're authenticated.  
fatal: Could not read from remote repository.

Please make sure you have the correct access rights  
and the repository exists.

I have another repository on the project that works well


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

Thank you for contacting Bitbucket Cloud Support.

I would suggest executing the following command to check how you have your repositories remote connections configured:

```
git remote -vvv
```

If the working repository path differs from the repository that is not working - I would suggest updating your remote URL's to include your [App Password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/#Create-an-app-password) as we stopped supporting username/password authentication over HTTPS some time ago:

```
git remote set-url origin https://USERNAME:APP_PASSWORD@bitbucket.org/workspaceID/reposlug.git
```

The same applies when performing a git clone:

```
git clone https://USERNAME:APP_PASSWORD@bitbucket.org/workspaceID/reposlug.git
```

I would suggest ensuring also that all stored passwords related to authentication over GIT are cleared from your machine (ie Credential Manager for Windows, Access Keychain for Mac or /etc/shadow folder for Linux).

Hope this helps.

If you are still encountering issues, please let me know and I will open a support ticket on your behalf.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
my dashboard has no + to add new repo / project
Asked by Putri Wulandari:

Hi, I am getting desperate because I have been searching for solution for days now. I can't seem to access my workspace. It is now shown up in my dashboard. I can't add new repo, can't add new project, I have no such options. Could someone please help? :(


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

May I know what issue you have with being unable to add a new repository or Project?

Have you tried clicking the **Create** button on the middle top position \> Repository to create a new repository? While creating the repository under the Project drop-down menu, you can select an existing Project or create a new project.

Let me know if you can see it or if you are seeing a different things. Do provide me with a screenshot of what your issue are so I can understand your situation.

Cheers,  
Syahrul

comments: author: Putri Wulandari
body: Thank you first and foremost for the reply.

The thing is I only got this "Snippet" when I click on "Create" :(

![ss bitbucket.png](https://community.atlassian.com/t5/image/serverpage/image-id/256522i3C2768B368E1FA88/image-size/large?v=v2&px=999 "ss bitbucket.png")![Screenshot 2023-05-11 075247.png](https://community.atlassian.com/t5/image/serverpage/image-id/256523i1182194473BCE570/image-size/large?v=v2&px=999 "Screenshot 2023-05-11 075247.png")


author: Syahrul
body: Hi [@Putri Wulandari](/t5/user/viewprofilepage/user-id/5212785)

Thanks for the screenshot.

You can't create a repository in the workspace due to insufficient permissions. Based on my investigation, you may have accidentally opened another user's workspace with a similar name to yours.

To locate the correct workspace where you have the necessary permissions, please click on the top right corner of your avatar and select "All Workspaces." Look for the workspace with "Manage" listed on the right side, as that should be your correct workspace where you can create a repository.

Let me know how it goes.

Cheers,  
Syahrul


author: Putri Wulandari
body: [@Syahrul](/t5/user/viewprofilepage/user-id/744536) thanks again for the reply. I really appreciate it!  
I am not sure why then I can't access "blackswan1" workspace. In my current workspace I only got "wulandari-putri" as my workspace. But I did create my "blackswan1" workspace. I don't know why it's not listed.

is there anyway to retrieve my blackswan1 workspace?


author: Putri Wulandari
body: [@Syahrul](/t5/user/viewprofilepage/user-id/744536) hey thanks for being helpful, I tried to sign in with all my account and I got my workspace fioh. Sorry it was a newbie question. But appreciate for help! :) Good day Syahrul


Tags: bitbucket-cloud

cloud
Use variables in Bitbucket Pipelines artifacts section
Asked by carlos_delossantos:

I have a variable defined in my repo variables which value is a path, but I cannot use it in my pipeline's artifacts section:  

```
script: 

 - mkdir -p $NOG_HOME/lib/middleware

 - unzip nog-middleware.zip -d $NOG_HOME/lib/middleware/ 

 - ls -la $NOG_HOME/lib/middleware

artifacts:

 - $NOG_HOME/lib/middleware/**
```

It does not resolve my variable in the artifacts, I have to put the entire path.  

Do you know if this is posible?


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

This is not supported at the moment, the path should be used instead of a variable.

We have a feature request about this in our issue tracker:

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

I would suggest adding your vote there (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Pipeline error when build test in ios swift
Asked by BHANU PRATAP YADAV:

Could not find Package.swift in this directory or any of its parent directories.


Answers:
author: markus.johansson
body: It's very unclear from your question what you are trying to do, but I had the same error.

The problem for me was that I used the bitbucket pipeline template for swift, which (if I understand it correctly) builds a swift package. But in my project I wasn't building a package, but instead I'm building an app.

So instead of the template command I use something like:  

```
xcodebuild test -project myProj.xcodeproj -scheme MyProj -destination 'platform=iOS Simulator,name=iPhone 13 Pro,OS=17.0.1' | xcpretty -s 
```


author: markus.johansson
body: I get this same error, and I don't use any packages... Even if I add some package in the swift package manager it will not add a \`Package.swift\` file...  
Is there some requirement that the system under test must be a package or something?


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

You will need to set up your build environment so that it includes the missing package. We can't tell you anything more than that, based on a snippet of error and no other information.


Tags: cloud
Delete Branch in bitbucket using Rest API
Asked by Usha Paluru:

Hi Team,

Is it possible to delete the branch in bitbucket using the RestAPI.

Regards,

Usha


Answers:
author: Victor Menes
body: Hey Usha,

Welcome to Atlassian Community!

From Bitbucket's REST API that seems to be possible. Take a look at the documentation for it below and see if that helps :)

* [Bitbucket REST API - Delete Branch](https://developer.atlassian.com/server/bitbucket/rest/v809/api-group-repository/#api-branch-utils-latest-projects-projectkey-repos-repositoryslug-branches-delete)

Victor Menes
Fatal Error: Git Push
Asked by Mehnur Baig:

Can someone please tell me about the error that says, "Cannot prompt because user interactivity has been disabled"? I'm really sorry if this is too little information, but I'm fairly new to this, and whenever I try to push changes into Bitbucket using the git push command, this error message displays.


Answers:
author: Peter Van de Voorde
body: Hi [@Mehnur Baig](/t5/user/viewprofilepage/user-id/5212141) ,

Welcome to the Atlassian Community!   

Sounds like you're encountering the same problem as the community member in this thread: <https://community.atlassian.com/t5/Confluence-questions/I-cannot-access-my-bit-bucket-repository-from-jenkins/qaq-p/1913765>   

I would recommend to check out the solution provided in that thread.  

Cheers,  
Peter

comments: author: Mehnur Baig
body: Thanks, [@Peter Van de Voorde](/t5/user/viewprofilepage/user-id/781487)


Tags: bitbucket-cloud

cloud
How to share the conflict merges with other team member in a pull request?
Asked by Balasri sai chandana:

I would like to know the way of sharing the work load with other team members for conflict merges which requires a manual resolution.

When we try to make changes for few conflict merges and commit - GIT is not allowing as there are few more conflicts to be solved. So is there a way to meet this need?


Answers:
author: Theodora Boudale
body: Hi Balasri,

I don't think there is an easy, automated way of doing that. If you want to keep the version of the conflicted file in a certain branch, you could do the following:

Assume you have a PR from feature-A branch to dev branch and conflicted files fileA.txt and fileB.txt

For fileA.txt, if you want to keep the version of the file in feature-A branch, then

* checkout dev branch
* edit fileA.txt to match the content of the file in feature-A branch
* commit and then push dev branch to Bitbucket

If you want to keep the version of the file in dev branch, then

* checkout feature-A branch
* edit fileA.txt to match the content of the file in dev branch
* commit and then push feature-A branch to Bitbucket

Then, for fileB.txt, another team member could do the same.

You would need to communicate with your team members which files each of you is going to adjust, to prevent further conflicts.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud