youngmon/atlassian-qna huggingface dataset:
When cloning a project in VS Code, failing with authentication failed
Asked by Digambar Mishra:

I have added Bitbucket to VS Code.

Now I am cloning the project in VS code but it is failing.

I have given custom Bitbucket as it is Company Bitbucket.

Why is failing when cloning a Repository


Answers:
author: Mark C
body: Hi [@Digambar Mishra](/t5/user/viewprofilepage/user-id/5062717),

Welcome to the community.

When you clone from VS Code, would you be able to confirm if you are using an [App password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/) as your password credential?

Could you also try to clone using the Git clone command below in your terminal/command prompt and see if you're able to clone it?

```
git clone <repository here>
```

Let me know how it goes.

Regards,  
Mark C

comments: author: Digambar Mishra
body: I am using Custom dataset to add Jira and Bitbucket.

I have used corporate User iD/Password there.

I attached some screen shot here.

Where do I Give App Password.

I used Git clone but it failed.

I am expecting this Git clone should be able to create folder in My Local PC.

![Bitbucket_Profile.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/222997i803E3C11FA38F491/image-size/large?v=v2&px=999 "Bitbucket_Profile.jpg")![Custom_Bitbucket.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/222996i4A1FC601F516A325/image-size/large?v=v2&px=999 "Custom_Bitbucket.jpg")![Gitclone.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/222995iED58B13DAF791989/image-size/large?v=v2&px=999 "Gitclone.jpg")


author: Mark C
body: Hi [@Digambar Mishra](/t5/user/viewprofilepage/user-id/5062717)  

Thanks for the screenshots.  

I do believe you're referring to your Bitbucket Server instance in this case.  
I was actually referring to Bitbucket Cloud.  

Let me put this question into the correct category.  

Regards,  
Mark C


Tags: bitbucket-cloud

bitbucket-server

cloud
How to apply the same branch restrictions to multiple repos
Asked by Mark Mindlin:

Hi,

We try to find if "branch restrictions" on Repository settings -\> "Branch restrictions" could be saved somehow?

And applied the same branch restrictions to multiple repos?


Answers:
author: Theodora Boudale
body: Hi Mark,

I'm afraid that this is not possible in Bitbucket Cloud yet. However, the development team has been working on implementing branch restrictions for projects, so that admins can set up branch restrictions for a project, and then the repositories in the project will inherit them.

This is expected to be released in Q3 2022:

* [https://www.atlassian.com/roadmap/cloud?selectedProduct=bitbucket\&search=project](https://www.atlassian.com/roadmap/cloud?selectedProduct=bitbucket&search=project)

Once this feature is implemented, we are going to update the public feature request we have here: <https://jira.atlassian.com/browse/BCLOUD-14566>

You can add yourself as a watcher to that feature request if you'd like to get notified via email on updates.

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

Kind regards,  
Theodora

comments: author: Mark Mindlin
body: Thanks Theodora,

It would be good if you could sent me a notification when the functionality is available.

Kind regards,

Mark


author: Theodora Boudale
body: Hi Mark,

You are very welcome.

Please make sure to add yourself as a watcher to the feature request if you'd like to get notified via email of updates. If you open the feature request here <https://jira.atlassian.com/browse/BCLOUD-14566>, you will see a link "Start watching this issue" in the right-hand panel. If you select that, you'll get notified via email when there is an update.

We don't send updates regarding the implementation of feature requests on individual community posts or support tickets, but rather we update the respective feature request in our public issue tracker. This way all users who have expressed interest and added themselves as a watcher will get a notification.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

restriction
I'm getting the error "We couldn?t log you in"
Asked by Javad Razavian:

[@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086)

I have the same issue, could you check my account?

I think my account is marked as Spam too!


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

Your account was not marked as Spam, but it was deactivated due to inactivity.

I went ahead and reactivated it, could you please let me know if you are able to log in now?

Just a heads up, I moved your post to a new question. For future reference, I would suggest creating a new question if you need assistance, as a question can become difficult to follow if we try to troubleshoot multiple users' issues in it. A new question will also have visibility to the rest of the team in case I am out of office.

Kind regards,  
Theodora

comments: author: Javad Razavian
body: Dear [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086)

Hi

Appreciate your time and consideration.

Now, it works like a charm.

Best, Javad


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

Please feel free to reach out if you ever need anything else!
Bitbucket Server to Slack Notifications not working
Asked by p2paul:

Hello,

I'm trying to set up a standard webhook in my repo from Bitbucket (server) to post notifications to a Slack channel.

I have tested curl to the Slack channel and confirmed it works correctly and therefore is configured on the Slack side correctly. (I tried from the Slack side both via custom integration and via Slack apps)

However, when I try to test the webhook, or make a repo change that should trigger the webhook, the webhook fails with a 400 response code and either the message "no text" or "missing_text_or_fallback_or_attachments".

Investigating further, looks like communication to Slack is working but the payload from Bitbucket is not.

Has anyone run into this problem and found a solution?

Please note, I cannot use the Slack Integration add-on because my bitbucket server is behind a firewall and NOT accessible from the internet. Though, I'm not sure if it's possible to still use the slack integration minus the Slack to Bitbucket communication. If anyone has tested that, let me know as well.

For what it is worth, I followed the instruction here to set up the custom Slack app and use a webhook to it from Bitbucket:

<https://confluence.atlassian.com/slack/use-slack-and-bitbucket-server-together-974387205.html>

This document states: "you are still able to setup a limited connection with Slack by creating a custom Slack app that will give you notifications from Bitbucket to Slack. See how to create an app below in this page."

Thanks for any input.


Answers:
author: Mykhailo Vlasov
body: Hello [@p2paul](/t5/user/viewprofilepage/user-id/5061629) !

I am member of the team that supports official Atlassian integration - Bitbucket Server for Slack. I have just tested the latest version of the plugin (4.0.4) locally on my Bitbucket Server that isn't accessible from the internet and it successfully sends notifications to Slack in limited mode. I am not aware about configuration of your firewall, but if your desktop or web Slack client works fine, there are big chances for Bitbucket plugin to do the same.

The limited mode was specifically designed for such use case, when Bitbucket Server doesn't have a public URL, that may be used by Slack. Only outbound requests to Slack API and authentication pages need to be allowed.

comments: author: p2paul
body: Thanks Mykhailo!

We went ahead with the limited mode and it works exactly as expected. Appreciate the quick response.


author: ???
body: Seems like I am having the same problem.

I am trying to use zapier to filter new messages from Bitbucket Slack Bot but can't because the \`Text\` field is arrived empty.

Messages from jirabot are working fine. Their \`Text\` fields are filled with texts.

please share your thoughts on this. [@p2paul](/t5/user/viewprofilepage/user-id/5061629)

![?????????? 2024-02-13 ???? 3.55.53.png](https://community.atlassian.com/t5/image/serverpage/image-id/306005iE059592058C8FA5E/image-size/large?v=v2&px=999 "?????????? 2024-02-13 ???? 3.55.53.png")


Tags: bitbucket-server

server
Personal Access Token
Asked by Andrea Pannitti:

Hi all,  
I was able to create a bitbucket project by REST API, using the following:

/rest/api/1.0/projects \[POST\]

With the following body:

{"key": "TEST", "name": "TestProject", "description": "Test"}

And using the Basic Authentication.

Now, I create a Personal Access Token for a Bitbucket user admin and I'm trying to call the same REST api to create another project using the Personal Access Token but in this case I receive an error 401 Unauthorized: You are not permitted to access this resource.

How could I solve this problem?

Thanks


Answers:
author: Andrea Pannitti
body: The problem is due to the fact that with token authentication it is possible to:

Create and fork repositories  
Update project settings and permissions  
Update repository settings and permissions  
Push to repositories and perform pull request actions  
Pull and clone repositories

But not to create projects.


author: Idan Bidani
body: Hi

Can you test a GET request? the token should be used in the same place the password was together with the username.

For ex. in curl it should look like this:

```
curl -s --user <userID>:<TOKEN> --request GET https://URL/rest/api/latest/projects?limit=10
```

comments: author: Andrea Pannitti
body: Hi [@Idan Bidani](/t5/user/viewprofilepage/user-id/541225) ,

no, I need to call in POST because I must create a new Project on Bitbucket and I want use the Personal Access Token because more secure of the Basic Authentication.

Regards


author: Markus Pietrek
body: I would second that request. We also have to create projects and want to use HTTP access tokens for it.  

With the current limitations we have to use the login password of a user with project admin permissions.This is a big security risk especially as we have to pass the credentials via IPC to the process creating the projects.  

A token with just the capability for project creation and initial configuration would be best.


Tags: bitbucket-server

server
Questions about the two-step verification
Asked by Fabio:

Hi!

We are thinking in enable the two-step verification feature, but we need to know more details about the behavior, like:

1. Expiration time of each session.

2. Can I adjust and change this time?

3. Does the user need to put the code every time they perform a push/pull/clone?

4. In addition to the mobile app, can I send the code trough sms or email too?

5. Can I enables this resource only to a single project (per-project activation)?

6. The ssh key is a pre-req?

Thank you.


Answers:
author: Ben
body: Hey Fabio!

Welcome to the Bitbucket Cloud community :)

1. There is no expiration time per se, once you have authenticated using 2FA - you will be able to access your account until either the browsing session is cleared or the account is logged out

2. There is no ability to adjust the expiration time

3. No, the 2FA authentication is exclusive to accessing the Bitbucket Cloud account when logging in via the website. SSH key is used for SSH authentication, App Password is used for HTTPS authentication.

4. No, 2FA authentication is handled through either mobile applications or a security key device (ie Yubikey). Resetting the 2FA codes requires you to reset this on the login screen or via SSH key - this is detailed in the following article:  
<https://support.atlassian.com/bitbucket-cloud/docs/enable-two-step-verification/>

5. No, 2FA authentication is configured at the workspace level - it cannot only be applied to certain projects/repositories

6. SSH key is not a pre-requisite, SSH keys are used for authentication with GIT/Pipelines

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Bitbucket Pipeline stuck on "Running" after downloading custom "node" cache
Asked by pedrosanta:

I have the following \`bitbucket-pipelines.yml\` on my repository: <https://pastebin.com/hYKsimBv>

On it I've added a custom 'node' cache to the step---which gets successfully uploaded at the end of the first run (see here <https://imgur.com/a/R0h6nHq>).

But when the pipeline relies/downloads the cache, the pipeline gets stuck on "Running" (see here <https://imgur.com/a/o26HH1g>).

Any ideas on what might be happening? How could I debug this?


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

If I understand correctly, the issue is that the build gets stuck on the "Build Setup", is that correct?

How much time does the build spend on the "Build Setup"?

Did you leave the build to see if it continues to the script's steps, or did you manually stop it after some time?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Repository exceeded file size limit - reduced Repository size but still can not push
Asked by Kai Brodrecht:

Hey everybody,

we've exceeded the file size limit of our repository. To reduce the size we deleted unused branches and excluded some files. If we use the command ***git count-objects -Hv***we get:

count: 2943  
size: 140.03 MiB  
in-pack: 59012  
packs: 10  
**size-pack: 3.51 GiB**   
prune-packable: 25  
garbage: 0  
size-garbage: 0 bytes

So the size-pack is 3.51 GB and should not exceed the file size limit?

I saved my local changes to a new branch and tried to reset the critical branch to a previous commit using ***git push --force***but than it says that the repository size is 4.2 GB and I can not push to the repository.

Do you have any suggestion what to do next?

Best Regards

Kai


Answers:
author: Syahrul
body: Hey [@Kai Brodrecht](/t5/user/viewprofilepage/user-id/5059895)

Welcome to the community!

The size did not reduce because the remote repository still has all the dangling commits and cache taking the repository size.

Nevertheless, I have triggered Git GC on the affected repository that was in 4GB size, and the size has been reduced to 1.9GB after GC is complete.

Let me know if that helps.

Cheers,  
Syahrul

comments: author: Kai Brodrecht
body: Hey [@Syahrul](/t5/user/viewprofilepage/user-id/744536)

thank you the GC did the job. Is it possible to trigger garbage collection by myself? If the problem occurs again.

Best regards

Kai


author: Syahrul
body: Hey [@Kai Brodrecht](/t5/user/viewprofilepage/user-id/5059895)

Awesome.

Currently, Bitbucket cloud runs Git GC automatically regularly.

However, if you need an immediate GC, you'll have to raise a support ticket or community questions request to trigger the GC manually

Also, we have an enhancement request open to allow users to mark their repositories for GC, which you can refer to below:

* [Allow users to mark repositories for git gc](https://jira.atlassian.com/browse/BCLOUD-11593)

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
Not getting reset password link for this email id
Asked by Allen Francis:

I am not getting reset password link for this email id


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

Welcome to the Bitbucket Cloud community :)

I have checked your email and can see it was added to our internal suppression list with the following message due to receiving an SMTP bounce from your mail server:

```
550: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 https://support.google.com/mail/?p=NoSuch... - gsmtp
```

I have just removed your email address from our internal suppression list, please attempt to send through the email again now.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Allen Francis
body: Thanks [@Ben](/t5/user/viewprofilepage/user-id/4537226) . I had actually solved this through support ticket


Tags: bitbucket-cloud

cloud
SourceTree 2.3.5 Authentication Error
Asked by Nicholas Ventimiglia:

When I try to push / pull I am getting auth errors.

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream origin _nick/test:_nick/test  
Pushing to <https://github.com/domain/Project.git>  
ERROR: Authentication error: Authentication required: You must have push access to verify locks  
error: failed to push some refs to '<https://github.com/>domain/Project.git'  
Completed with errors, see above.

I attempted to use the git terminal, here is my trace. I noticed when I enter an incorrect password it outputs an error. when I enter the correct password the prompt continues without any output.

nick@LAPTOP \~/Documents/domain/Project(_nick/test)  
$ git fetch  
Username for '[https://github.com': userName](https://github.com':?userName)

nick@LAPTOP-3GV274KQ MINGW32 \~/Documents/domain/Project(_nick/test)  
$

I have deleted my password file  
<https://community.atlassian.com/t5/Sourcetree-questions/Getting-quot-fatal-Authentication-failed-for-quot-error/qaq-p/624663>  

I have attempted a personal access token and a basic password. please advise.  


Answers:
author: Mike Corsaro
body: Hello! Looks like you're trying to interact with GitHub. Rather than needing to enter a username and password, you can add a Remote Account that uses OAuth which may solve your authentication issues. Here's a step-by-step guide on how to do that:

![oauth.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/12351i7857F0A9230505D7/image-dimensions/617x385?v=v2 "oauth.PNG")

Once you click "Refresh OAuth Token" your webbrowser should open. Follow the directions there and once done switch back to Sourcetree and hit OK. Then try pushing again and see if it works.


Tags: windows
help to get started
Asked by paul Kirk:

Hi I am completely new to source control. I got in a bit of a tangle trying to duplicate a visual studio solution I wrote, so decided to try source control. A post in a forum suggested Git, so I signed up and ran the demo 'hello world'.

The forum also suggested atlassian as a good way to visualise without using a command line, so I thought Id' use that too.

However, I am completely stuck and need the most basic help to get things up and running.

Currently I am building an Arduino sketch and thought I'd try to source control that as a starting point. It is on my C: drive in this folder:

C:\\Users\\Paul\\Google Drive\\Arduino sources

Could anyone explain in easy steps what to do next. e.g. is the directory

C:\\Users\\Paul\\Google Drive\\Arduino sources

the repository or do I create a new empty folder for that? Then what?

Do I just use sourcetree or does sourcetree seamlessly manage GIT without my intervention?

Thanks very much for help,

Paul


Answers:
author: bgannin
body: Under the Help menu you'll find a couple links that might help...

1. "Getting Git Right" as a general introduction

2. "Get Started with Sourcetree" as a guide for our itself

Armed with those you'll likely have a whole different set of questions ?

comments: author: bgannin
body: We've also started posting "Tips from the team" articles here on Community so check those out as well.


Tags: git
How do I connect SourceTree with a private GitLab account?
Asked by David Schwartz:

My company has licensed GitLab and hosts it on a company subdomain. How can I set up SourceTree to talk to this repo host?  

(I've tried several git GUI apps and none of them allow me to connect, even expensive commercial ones! The company pays a lot of money to the GitHub folks for a private host. It's really annoying that nobody has an obvious way for us to connect to it.)


Answers:
author: bgannin
body: Sourcetree does not currently support GitLab as a hosting service. This request is tracked in [SRCTREE-1037](https://jira.atlassian.com/browse/SRCTREE-1037).

While you can't browse remotes or utilize any other extended integrations you are able to clone the repo via URL and use the rest of Sourcetree without restriction.

Brian Ganninger  
Senior Mac Developer, Sourcetree

comments: author: David Schwartz
body: The question isn't so much about supporting "GitLab" but rather the ability to support any remote host.

That said, it magically started to support my remote host, apparently finding the details for it in my \<project\>/.git/config file after I set up Tower to connect to it.

So it looks like it CAN support anything -- it just has no means to configure arbitrary hosts directly.


author: pbr
body: That ticket is now closed.

So there is no plan to support Gitlab?


author: Carisa
body: Hi there! [SRCTREE-1037](https://jira.atlassian.com/browse/SRCTREE-1037) was closed because we've added GitLab support in Sourcetree 3.0, which is now in public beta! ? More info: [https://blog.sourcetreeapp.com/2018/08/29/sourcetree-3-0-branches-out-with-new-hosting-services/](https://blog.sourcetreeapp.com/2018/08/29/sourcetree-3-0-branches-out-with-new-hosting-services/?)


author: Yaraslauna Simaka
body: [@Carisa](/t5/user/viewprofilepage/user-id/524067) , but I still can't add private GitLab account in Sourcetree. Could you provide any instructions?


author: Julian Zammit
body: Hi [@Carisa](/t5/user/viewprofilepage/user-id/524067) the question wasn't so much related to GitLab, but was more specifically "how can we connect privately hosted GitHub/Lab etc. instances to SourceTree?"  

Any chance you could help on this?  

Thanks


author: CTO
body: Well, 3 years later, I am trying to do this. Tower works fine, now trying Source Tree. but alas, gitlab CE, Enterprise or any other option does not connect to a privately hosted Gitlab. At least the Mac version. This gives me more excuses to move away from Atlassian sweet of products.


author: hendisantika
body: I have got same issue with others. But no updates ya?

Maybe SourceTree doesn't support with private GitLab Self-Manage.


Tags: atl-gruland
Get deleted commit back
Asked by CremeFresh:

I commited my project, but I forget to add something to it, so I wanted to delete that commit. Unfortunatly I resetted my last commit to the last pushed branch, so all my progress was gone. My commit is gone and so are my new files.

Is there a way to get my last commit back?


Answers:
author: bgannin
body: Are you using Git or Mercurial?