youngmon/atlassian-qna huggingface dataset:
Problems with upload my files using my git CLI
Asked by KADU46550:

When I went to upload some codes, I came across the message.

This is the message showed in the Git Terminal.

$ git push origin master  
fatal: credential-cache unavailable; no unix socket support  
To <https://bitbucket.org/kadu1248/teste-pratico-iniflex.git>  
! \[rejected\] master -\> master (fetch first)  
error: failed to push some refs to '<https://bitbucket.org/kadu1248/teste-pratico-iniflex.git>'  
hint: Updates were rejected because the remote contains work that you do  
hint: not have locally. This is usually caused by another repository pushing  
hint: to the same ref. You may want to first integrate the remote changes  
hint: (e.g., 'git pull ...') before pushing again.  
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

could you help me, because it is recurring?


Answers:
author: Ben
body: G'day!

Welcome to the Bitbucket Cloud community.

The error message you are receiving is likely due to your remote repository commit history being ahead of your local repository commit history.

You will first need to pull the changes from your remote before attempting to push from your local by running the following commands so that they are in sync:

```
git pull
git push
```

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
customize the content of the notification email on commit
Asked by Refael Avez:

Hi ,

Is it possible to include a diff on modified files to the notification email?

Thanks

Refael


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

I'm afraid that this is not possible, the content of the notifications emails cannot be customized.

You can select the commit hash in the body of the email in order to open the commit on Bitbucket website and view its diff.

Kind regards,  
Theodora

comments: author: Refael Avez
body: Hi Theodora,

Is there an addon that can do that for bitbucket cloud?

Similar to "[https://marketplace.atlassian.com/apps/1211185/notifyr-notifications-for-bitbucket?hosting=server\&tab=overview](https://marketplace.atlassian.com/apps/1211185/notifyr-notifications-for-bitbucket?hosting=server&tab=overview)" ?

Thanks

Refae


author: Theodora Boudale
body: Hi Refael,

I checked the add-ons available in the Marketplace, but I do not see one that sends such notifications.

You could use webhooks in order to send a request to one of your servers on every push and then send an email with customized content (including the diff) to the users you want using your own mail server:

* <https://support.atlassian.com/bitbucket-cloud/docs/manage-webhooks/>

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Import Repository from Github fails - HELP
Asked by MikeCharity_gmail_com:

I'm not doing anything special. My github repo is private and I do provide the required authorization details when choosing the import option. Any help would be greatly appreciated. Thanks in advance.  

1. 08:54:48 git import for: <https://github.com/msicreditntell310/creditntell.git>
2. 08:54:48 Cloning <https://github.com/msicreditntell310/creditntell.git>...
3. 08:54:49 Remote Git clone failed: \<class 'bitbucket.apps.asyncx.tasks.RepoImportTask.ImportException'\>: Command failed. Return value: 128


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

May I ask which authentication method are you using for HTTPS? If you are using username/password, I would suggest instead using a personal access token instead:  
<https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Is there any BB Data Center API to delete a file with a commit?
Asked by Anukriti Gupta:

I can't find any support for this.


Answers:
author: Alex Koxaras _Relational_
body: Duplicate <https://community.atlassian.com/t5/Bitbucket-questions/Is-there-any-BB-Data-Center-API-to-create-update-delete-MULTIPLE/qaq-p/2207680>


Tags: bitbucket-data-center
How to add ssh-key with write permission for applicative/technical user
Asked by afabry:

Hello,

I wan't to autohorize an applicative/technical account to commit and push to a specific bitbucket repository.

I don't know how to do it because the access-keys at the repository level only allow reading

Thank you for your help.

Regards


Answers:
author: Theodora Boudale
body: Hi [@afabry](/t5/user/viewprofilepage/user-id/2310974),

If you want to use SSH, there are two options:

1) You can create a separate Bitbucket account, give that account access to the repo you want, upload the public ssh key to its profile, and then use it to push to the repo.

2) Another option would be to use workspace SSH keys, open the workspace on Bitbucket Cloud website \> select **Settings** \> select **SSH keys**.

Please keep in mind though that this SSH key pair will then be able to access all of the workspace's repositories. Additionally, we will not be able to track an action performed with this SSH key pair back to a certain user. Therefore, it would be good to consider which people have access to the server where this SSH key pair will be located, in order to decide if it's the best option for you.

I'm afraid that it is not possible to use an SSH key pair with read/write permissions without associating with an account or with a workspace.

<br />

If you don't mind using HTTPS, you can look into another option we recently added, Repository Access Tokens:

* <https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokens/>

They provide access to a single repository and you can define their scope when you create them. The page I shared has links to other pages with more info on how to create them, use them, revoke them, and their permissions.

Kind regards,  
Theodora


author: marc -Collabello--Phase Locked-
body: Hi [@afabry](/t5/user/viewprofilepage/user-id/2310974) ,

Each user should have their own ssh keys. If the user has push/write permissions, the user should be able to push.

comments: author: afabry
body: Hello [@marc -Collabello--Phase Locked-](/t5/user/viewprofilepage/user-id/1205132) ,

Thank you for your answer.

I agree with your point for human users, but in my case I'm talking about a technical/application user.  
Do I have to create a Bitbucket technical account for this user? (with an associated SSH key)  
Is it possible to create an SSH key for an application account with read/write rights without associating it with my bitbucket account?


Tags: bitbucket-cloud

cloud

key

ssh

ssh-key
Can't enable pipeline even though I did two-factor authentication
Asked by ForUiPathacc94:

I have read other people's questions on this issue. Made two-factor authorization uses Duo system on both pages: <https://bitbucket.org/account/settings/two-step-verification/manage>, and [https://id.atlassian.com/manage-profile/security.](https://id.atlassian.com/manage-profile/security)

On the pipeline settings page, I still can't enable the pipeline.

Solve this problem![2022-12-03 011146.jpg](/t5/image/serverpage/image-id/228721i017CAF856608D5B5/image-size/large?v=v2&px=999 "2022-12-03 011146.jpg")


Answers:
author: Ben
body: G'day!

Welcome to the Bitbucket Cloud community! :)

I have checked your workspace and can see that 2FA is not actually enabled, I would suggest following the guide below to enable this (BBC 2FA is seperate from Atlassian Account 2FA):  
<https://support.atlassian.com/bitbucket-cloud/docs/enable-two-step-verification/>

Once this is enabled, access "Pipelines" from the sidebar from the main repository menu - from here you can run through the Pipelines setup wizard which should enable pipelines.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

sourcetree
When I use Gitflow and there is a conflict, the branch is not deleted
Asked by ThePokyWizard:

I use BitBucket Cloud with GitKraken as GUI to manage my repositories.

To work, my team and I use the Gitflow method.

How our workflow for creating a new branch and terminating it works:

1. We started a new Branch (Feature/Hotfix). For the Feature type, we rely on Current Branch (master) instead of "Lastest develop".

2. When we're done working, we click finish branch feature/name-branch. And we leave the "Delete branch" option checked instead of "Rebase on develop".

3. If a conflict occurs, it will stay on the develop branch until we fix the conflicts. That done, we start a Release, based on "Latest develop" instead of "Current branch" and finalize the Release branch.

It happens that when there are these conflicts, the branch sent to bitbucket is not deleted. And in our GitKraken, they are not "merged" in the repository timeline, but actually in the master.

Am I doing something wrong working with conflicts?

<br />

In the image below, you can see that the feature-2 branch was terminated and was not merged into the master line. Even the code created in it being in the master.

![Captura de Tela 2022-12-02 a?s 13.55.01.png](https://community.atlassian.com/t5/image/serverpage/image-id/228722i77361CEA24F9A848/image-size/large?v=v2&px=999 "Captura de Tela 2022-12-02 a?s 13.55.01.png")


Answers:
author: Theodora Boudale
body: Hi [@ThePokyWizard](/t5/user/viewprofilepage/user-id/1661054),

If you perform all these operations in GitKraken, I would suggest reaching out to the support team of GitKraken via <https://help.gitkraken.com/gitkraken-client/contact-support/> or join their Slack channel <https://slack.gitkraken.com/> to ask for help.

This application is not built by Atlassian and I don't know what commands are executed in the background, if there are any logs that can help you figure out what is happening, or if this is perhaps a bug.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Create workspace ssh key using the api
Asked by Arthur Gramiscelli Branco:

Can that be done? I didn't find anything related on the documentation for workspaces, only for repositories.  

edit: I found this unanswered question from 2021 with the same problem: <https://community.atlassian.com/t5/Bitbucket-questions/How-can-I-use-the-Bitbucket-API-to-add-an-SSH-key-to-a-Workspace/qaq-p/1836286>


Answers:
author: Theodora Boudale
body: Hi Arthur,

This is possible using the endpoint for adding an SSH key to users:

* <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-ssh/#api-users-selected-user-ssh-keys-post>

{selected_user} in the URL should be the UUID of the workspace (enclosed in curly brackets).

You may need to URL-encode the curly brackets, replace { with %7B and } with %7D

You can get the UUID of the workspace using the following endpoint:

* <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-get>

Please feel free to let me know if this works for you and if you need anything further.

Kind regards,  
Theodora

comments: author: Arthur Gramiscelli Branco
body: Yes, that helps actually, thank you!  
I had to create an appassword for an user inside the workspace but it was enough authentication to add the key to the workspace.  

Ps: I think the documentation on this should be updated.


author: Theodora Boudale
body: Hi Arthur,

That's good to hear, thank you for the update!

I will talk with my team regarding updating the documentation.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Bitbucket pipeline- could not find htmlextra report post parallel run is complete
Asked by shivuhandral10:

Am running the postman collection in Bitbucket with parallel run \& run result is pass but htmlextra report is missing ![1st parallel step.PNG](/t5/image/serverpage/image-id/228690iBAF49E9DE855BBC6/image-size/large?v=v2&px=999 "1st parallel step.PNG")![2nd parallel step.PNG](/t5/image/serverpage/image-id/228689iE71C0130A8ED0444/image-size/large?v=v2&px=999 "2nd parallel step.PNG")both the steps.

am using below code in yml file. Can someone assist on this plz ?

    pipelines:  default:         - step:          name: I - Scenarios           script: # Modify the commands below to build your repository.            - npm install -g newman            - npm install -g newman-reporter-html             - npm install -g newman-reporter-htmlextra             - newman --version     - parallel:                        - step:            name : Scenario1            script:               - newman run ./aa/bb/Scenario1.postman_collection.json -e ./aa/bb/Scenario1.json --reporters cli,htmlextra --reporter-htmlextra-export testReport.html --delay-request 500        - step:            name : Scenario2            script:               - newman run ./aa/bb/Scenario2.postman_collection.json -e ./aa/bb/Scenario2_environment.json --reporters cli,htmlextra --reporter-htmlextra-export testReport.html --delay-request 500            artifacts:               - testReport.html


Answers:
author: Theodora Boudale
body: Hi [@shivuhandral10](/t5/user/viewprofilepage/user-id/5091745) and welcome to the community.

Test reporting in Bitbucket Pipelines works with JUnit and Maven Surefire XML formats at the moment, HTML reports will not be displayed.

If you would like to configure XML reports to be displayed in your Pipelines builds, you can have a look at the following documentation for more details and info on configuration:

* <https://support.atlassian.com/bitbucket-cloud/docs/test-reporting-in-pipelines/>

We have a feature request to support HTML reports in Pipelines:

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

You can add your vote and feedback to that feature request in order to express your interest.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Repository size exceeds limit
Asked by ???? Digital:

Hello!  

Bitbucket mentions that the size of the repo is currently ++4.58++++GB of 4 GB++. However, when running the **git count-objects -Hv** command, it shows me the following output:  

count: 0  
size: 0 bytes  
in-pack: 37012  
packs: 1  
size-pack: 949.80 MiB  
prune-packable: 0  
garbage: 0  
size-garbage: 0 bytes  

I run **git gc**but it did not help. Tell me, please, what am I doing wrong?


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

I ran a git gc for the repo that was over the 4 GB limit and its size has been reduced. Could you please check if you can see the updated size on Bitbucket website now?

I'm afraid that it is not possible for users to run a git gc on the remote repo, we have a feature request that you can vote for and add yourself as a watcher if you'd like to get notified via email on updates:

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

Please feel free to let me know if you have any questions.

Kind regards,  
Theodora

comments: author: ???? Digital
body: Yes, everything works. Thank you!


author: Theodora Boudale
body: That's good to hear and you are very welcome!

Please feel free to reach out if you ever need anything else.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Getting 500 on using Edit File BitBucket Data Center API
Asked by Anukriti Gupta:

**Curl**:  

```
curl --location --request PUT 'https://xyz-on-prem.mycom-beta.com/rest/api/latest/projects/IS/repos/new-repo/browse/newFile.txt' \

--header 'Authorization: Basic YWXXXXXXXXXXXXXXXXXXX==' \

--header 'Cookie: BITBUCKETSESSIONID=FXXXXXXXXXXXXXX' \

--form 'branch="main"' \

--form 'content="new file content"' \

--form 'message="Added new file"'
```

Hi, I am getting 500 on using BB Data Center API when I am trying to create a new file with commit using Edit File API.  
Link to the API: <https://developer.atlassian.com/server/bitbucket/rest/v806/api-group-repository/#api-api-latest-projects-projectkey-repos-repositoryslug-browse-path-put>  
I am getting the following error:  

```
{

"errors": [

 {

"context": null,

"message": "'/bin/git cat-file -t cbb0fc3bdedeeda8f8d9eaaaa8fc7644f93ec8ae:newFile.js' exited with code 128 saying: fatal: path 'newFile.js' does not exist in 'cbb0fc3bdedeeda8f8d9eaaaa8fc7644f93ec8ae'",

"exceptionName": "com.atlassian.bitbucket.scm.CommandFailedException"

 }

 ]

}
```


Answers:
author: Anukriti Gupta
body: When I am sending **sourceCommitId** as **null**in form body, I am getting the following error:

I want to create a new file, so that's obvious that newFile.js won't exist.

```
{

"errors": [

 {

"context": null,

"message": "newFile.js could not be edited because the file has been deleted on the null branch.",

"exceptionName": "com.atlassian.bitbucket.content.NoSuchPathException"

 }

 ]

}
```

comments: author: Anukriti Gupta
body: One more issue I am facing is that, I am not able to use Access Token to authorize the request. When I am using Access token, I am getting this error while for other APIs, it is working fine.  

```
{

"errors": [

 {

"context": null,

"message": "When performing an edit, the author must have an e-mail address.",

"exceptionName": "com.atlassian.bitbucket.validation.ArgumentValidationException"

 }

 ]

}
```


author: apuligundla
body: [@Anukriti Gupta](/t5/user/viewprofilepage/user-id/5092609) I am also facing the same issue, did you get a solution for the creating new file issue


author: Anukriti Gupta
body: Yes [@apuligundla](/t5/user/viewprofilepage/user-id/5199638)

The issue was that the Git version installed on our server was not compatible with the Bitbucket Data Center version.

Please find the compatibility details here: <https://confluence.atlassian.com/bitbucketserver076/supported-platforms-1026535721.html>


Tags: bitbucket-data-center
Showing Maintenance expires on our Commercial License Bitbucket(Data Center)
Asked by Yesuratnam Maddu:

Hi Guys,  
We have unlimited users Bitbucket(Data Center), today it's showing Maintenance expires , does it stops Bitbucket(Data Center), doesn't allows users create new issues ?

For other apps like Crucible and Fisheye same Red Warning "Maintenance expires" . Does stops working, if we didn't Renew our Maintenance license. Please suggest.


Answers:
author: Christian Glockner
body: Hi,

Once your license has expired, your Bitbucket Data Center instance will become read-only, i.e. changes can no longer be pushed to repositories.

Cheers,

Christian

Premier Support Engineer

Atlassian


Tags: bitbucket-server

fisheye-crucible

server
Licenses for Bit Bucket (Data Center),Crucible (Server),Fisheye (Server),software expire on Dec 9
Asked by Yesuratnam Maddu:

Hi,

**All licenses for Bit Bucket (Data Center), Crucible (Server), Fisheye (Server), software expire on December 9 2022.** Do we face any problems when license is not renewed on time? If so, can you tell me what are the problems are coming and how to solve them.

Thank You,

Yesuratnam M


Answers:
author: Nic Brough -Adaptavist-
body: For Bitbucket Data Center, it will stop working, going read-only until you renew the licence.

Fisheye and Crucible licences are "perpetual" - you will be unsupported and unable to upgrade, but the systems will continue to work, with only a warning note for admins about being unlicensed in a couple of places.


Tags: bitbucket-server

fisheye-crucible

server
Detect Revert Commit in pipeline
Asked by xicond:

Is There a way to detect Revert action in commit history when running pipeline steps  
the worst behave maybe by detecting commit message  

I want to clear cache if there's revert action, there's a rare case when revert happen after success packages from composer install being cached but reverted then it use successful cached


Answers:
author: Theodora Boudale
body: Hi [@xicond](/t5/user/viewprofilepage/user-id/16360),

By 'revert action', are you referring to a **git revert**?

If so, I don't believe there is an automated way to detect this. A revert commit is just a normal commit for Git.

If you standardize your revert commit messages, you could write a script that gets the commit message of the commit that triggered the pipeline and looks for specific words or phrases in order to figure out if it is a revert commit; then use this script in your pipelines build.

You can use any of the following two commands in your Pipelines build to get the message of the commit that triggered the pipeline:

```
git log -n 1 --pretty=format:%s $BITBUCKET_COMMIT

git show -s --format=%B $BITBUCKET_COMMIT
```

You would need to make sure in this case that all users who work on this repo use the standard message for revert commits only and not for any other type of commits.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Can't Login to Atlassian Account After Installation
Asked by Kyron Longwood:

Hi,  

I am trying to set up an Atlassian ID so that I can install sourcetree through my work email, however the verification email is not arriving and I am currently using my personal email to set up this support ticket. I have checked the spelling of the email address, and tried the resend verification option for the email, however it is still not arriving. Even checked spam/junk email within my email and still have not seen anything.

Any possible solution would be great.


Answers:
author: Ana Retamal
body: Hi Kyron! As we need to know the affected email address in order to check in our system, I've created a Support ticket for you so you can send that information privately. You'll receive an email notification at your current email address soon, please follow the instructions in the ticket so we can help you with the resolution :)

Have a nice day!

Ana
Push and pull hang to GitHub
Asked by rawnsley:

After working for years, SourceTree suddenly won't pull or push with my GitHub repositories. I can still do both of these from the command line on the same local repository.

I don't have any submodules or subtrees and the operations start but never finish:

![Screen Shot 2018-03-14 at 09.23.34.png](/t5/image/serverpage/image-id/17082iED1B2541A4325437/image-dimensions/492x274?v=v2 "Screen Shot 2018-03-14 at 09.23.34.png")

I've tried using embedded and system Git from the SourceTree preferences.

I've tried removing and re-adding my GitHub account details using HTTPS and SSH, but it makes no difference.

SourceTree version is 2.7.1.159 and I'm on OSX 10.13.3


Answers:
author: Manju
body: Is there an error that it spits out at the end?

comments: author: rawnsley
body: It doesn't stop even after several hours. Happy to send any additional logs or run diagnostics if you can give me a steer.


Tags: github
Unable to login from the source tree from atlassian account using the button
Asked by e2xinfotech:

While clicking the use an existing account on source tree application shows this

Log in with Atlassian account

We tried to load scripts but something went wrong.

Please make sure that your network settings allow you to download scripts from the following domain:

**<https://common-admin-cdn.atlassian.com/atlassian-id/front-end/2.4.18>**


Answers:
author: Ana Retamal
body: Hi! This is usually caused by an old version of the browser. Sourcetree relies on Internet Explorer for authentication, can you make sure it's updated to the latest version?

Apart from that, IE needs to be configured at a minimum as follows:

- Cog/Internet options/Security settings need to be enabled

- Misc/Access data sources across domains

- Misc/Allow META-REFRESH

- Scripting/Active Scripting

- The browser mode set to 10

- The document mode set to 10

These can be set using the F12 developer tools.

Those are the settings that matter. It should also be able to set them indirectly by:

- making sure [https://id.atlassian.com](https://id.atlassian.com/) is NOT set to be rendered in Compatibility Mode

- Set Cog/Internet options/Security to Medium-High

Let us know if this helped you!

Kind regards,

Ana