youngmon/atlassian-qna huggingface dataset:
How to search branches by name with pagination
Asked by Milos Petrovic:

I am using the next endpoint to search for the branches, **GET /2.0/repositories/{workspace}/{repo_slug}/refs/branches**.

Separately both the pagination and query searching work, but when combined an error is return. The error says "Invalid Page"

[List Branches DOCS](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-refs/#api-repositories-workspace-repo-slug-refs-branches-get)

---

Steps to reproduce ( using the example from the DOCS )

1. The docs provide the next url as an example ( I have just updated the pagelen and page to return the first 10 results ):

[https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=10\&page=1](https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=10&page=1)

2. If we add a query to search by name the error will be returned:

[https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=10\&page=1\&q=name\~](https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=10&page=1&q=name~)"issue"

3. If we remove the \`page\` query parameter, the data will be returned:

[https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=10\&page=1\&q=name\~](https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=10&page=1&q=name~)"issue"

---

So it looks like there is some issue with the "page" query parameter?  
Or am I doing something wrong?


Answers:
author: Erez Maadani
body: Hey [@Milos Petrovic](/t5/user/viewprofilepage/user-id/5161240)

Try removing the \`page\` parameter from the request and use the returned URL from the \`next\` attribute in the response.

comments: author: Milos Petrovic
body: Hey [@Erez Maadani](/t5/user/viewprofilepage/user-id/5018344)  

Yes this works! Thanks


Tags: bitbucket-cloud

bug

cloud
Failed to send email, Check your configuration settings: Connection unexpectedly closed
Asked by Satish Kumar:

Failed to send email: Check your configuration settings: Connection unexpectedly closed: The read operation timed out

I am using **atlassian/email-notify:0.8.0**

My Pipeline Script is:  
script:  
- pip install pytest  
# - pip install pytest-html  
- pytest -v -s test.py --junitxml=./test-reports/report.xml  
after-script:  
- apt-get update \&\& apt-get install -y zip  
- zip -r test-reports.zip test-reports  
- ALERT_TYPE="SUCCESS"  
- if \[\[ $BITBUCKET_EXIT_CODE -ne 0 \]\]; then ALERT_TYPE="FAILURE" ; fi  
- pipe: atlassian/email-notify:0.8.0  
variables:  
USERNAME: 'satishk@gmail.com'  
PASSWORD: ${PASSWORD}  
FROM: 'satishk@gmail.com'  
TO: 'dj.duraj@gmail.com'  
HOST: 'smtp-mail.outlook.com'  
PORT: 587  
DEBUG: 'true'  
SUBJECT: '${ALERT_TYPE}:Bitbucket Pipe Notification for ${BITBUCKET_BRANCH} branch of ${BITBUCKET_WORKSPACE}'  
BODY_PLAIN: 'Hello Team,\<br\>  
Please Find the attachement of \<b\>${ALERT_TYPE}\</b\> report of current pipeline status.'  
ATTACHMENTS: 'test-reports.zip'


Answers:
author: Patrik S
body: Hello [@Satish Kumar](/t5/user/viewprofilepage/user-id/5161237) ,

Welcome to Atlassian Community!

From the pipe configuration you shared, it seems like you are sending the e-mail from a Gmail account, but you have configured the HOST variable with the SMTP address of Outlook.

In order to send an e-mail from a gmail account, you will need to configure the HOST with Gmail's STMP address, which is **smtp.gmail.com.**Following is an example using Gmaiils configuration in the pipe :

```
- pipe: atlassian/email-notify:0.8.0    variables:      USERNAME: 'myemail@gmail.com'      PASSWORD: $PASSWORD      FROM: 'myemail@gmail.com'      TO: 'example@example.com'      HOST: 'smtp.gmail.com'      PORT: 587      SUBJECT: 'Bitbucket Pipe Notification for your-bitbucket-pipeline'
```

Please note that due to changes in Google not supporting less secure apps (see [Google changes for less secure apps](https://support.google.com/accounts/answer/6010255?hl=en#more-secure-apps-how)), to make this pipe work with a Google account, you will to create a [Google app password](https://support.google.com/mail/answer/185833?hl=en-GB).

For more details and examples of using the atlassian/email-notify pipe, you can check its official documentation in the link below :

* <https://bitbucket.org/product/features/pipelines/integrations?p=atlassian/email-notify>

Hope that helps!

Thank you, [@Satish Kumar](/t5/user/viewprofilepage/user-id/5161237) !

Patrik S


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

email

notification
.net framework
Asked by ????????????????:

.net framework had been updated to 4.7.2 automatically, and then...![TIM??20180915165711.png](/t5/image/serverpage/image-id/32345i91DCA0042FF63A4A/image-size/large?v=v2&px=999 "TIM??20180915165711.png")

and my OS prevents me installing 4.7.1...


Answers:
author: Ken Zen
body: After Windows 10 upgrade to latest build, I also encountered this issue.


Tags: windows
Sourcetree ask for auth, dont accept my login, reset mail not comming
Asked by Rardq:

Hello!

I was succesfully working with bitbucket repo and pushing changes, but today when I try to push to remote - sourcetree asked for credentials and dont accept my login and pass. I tried to reset - but no mail has come.

What is wrong and what should I do?


Answers:
author: Ana Retamal
body: Hi Denis!

Can you give us more information to help us troubleshoot your issue?:

1. Are you using Bitbucket Server or Cloud?
2. Are you using Sourcetree for Windows or for Mac?
3. Can you login to Bitbucket directly via the browser?
4. Can you send a screenshot of Sourcetree asking you for your credentials?

Kind regards,

Ana
Sourcetree Fails on Password When Cloning from remote repositories
Asked by Fleckism:

When I go to clone a remote repository, 2 Bitbucket login in windows appear, when I put in my password. I get the following error message

Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper="C:/Users/jfleck/AppData/Local/ATLASS\~1/SOURCE\~1/GIT_EX\~1/GIT-CR\~1.EXE" ls-remote https://Fleckism@bitbucket.org/Fleckism/survival01.git  
Output:  
Error: fatal: HttpRequestException encountered.  
An error occurred while sending the request.  
remote: Too many invalid password attempts. Log in at <https://id.atlassian.com/> to restore access.  
fatal: unable to access 'https://Fleckism@bitbucket.org/Fleckism/survival01.git/': The requested URL returned error: 403


Answers:
author: Mike Corsaro
body: Hello! This might have something to do with the git-credential-manager. Please download the update here (<https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/v1.17.1>) and make sure you switch Git to use "System Git" under "Options \> Git"

comments: author: Fleckism
body: Awesome!

Thank You
Cannot open sourcetree
Asked by Ibrahim:

![error.png](/t5/image/serverpage/image-id/32337iE1F119F032170DD7/image-size/large?v=v2&px=999 "error.png")

.NET framework is installed and other app that uses it works well except for sourcetree. And i am blocked from doing my work. Very disappointing. PLease help


Answers:
author: minnsey
body: Hi   

If you are running Windows' Insider Preview builds there was a bug on one of the recent releases, but it is fixed in a newer update.  

See <https://blogs.windows.com/windowsexperience/2018/09/11/announcing-windows-10-insider-preview-build-17758/#7DkSPoGCZ4ygKsht.97>


Tags: windows
Source tree hangs up while checking out into a remote branch?
Asked by austien:

In the repo I'm in with some classmates, I can get the bitbucket account clone just fine but when I try to checkout my remote branch into a new local branch, source tree seems to just hang and never get past the loading bar. I've tried uninstalling and reinstalling, even clearing the registry and reinstalling and it seems to not fix the problem.

I'm fairly new to source tree and git altogether but I had the same problem on my other computer and I've already done everything that fixed it there so I'm not sure what else to do. Any ideas?


Answers:
author: austien
body: Try using the the git cli to checkout the branch and see if it works. Maybe there is an error in repository configuration in sourcetree.

comments: author: austien
body: Thanks! I kept getting an error saying there was a git process already in progress so I uninstalled and reinstalled one more time and then used git bash to checkout and it seems to work now, even updated the source tree repo.


author: Moin Pathan
body: Can you please tell what command you have used to get checkout of remote branch?


Tags: bitbucket

bitbucket-cloud

cloud
I have changed my password 5 times now. But sourcetree keeps asking for my password.
Asked by Adeeb:

Please help! has something changed overnight?


Answers:
author: Manju
body: Can you please answer these questions to make us understand your problem,  
1. What hosting service are you using?  
2. What version of Sourcetree are you using?  
3. Is this on macOS or Windows?  
4. What is the error message you are seeing?  
5. Has this account been added to Sourcetree?  
6. If yes, is it using Basic vs OAuth? and ssh vs https?

Any steps and screenshots would help.
Plan upgrade still cites 2GB push limit
Asked by Asif_Aziz:

My repository was reached limit of 2 GB size so I purchased standard plan of $2 per month per user. Now still I can not push my code in to repository and it message me that your repository is reaches to limit of 2 GB. How I can resolve this issue.


Answers:
author: Edwin Kyalangalilwa
body: Hi [@Asif_Aziz](/t5/user/viewprofilepage/user-id/1822556),

Try logging out of the application and login back in. There might be an issue with cache.


Tags: git

windows
Hello, today I suddenly cannot push/pull my repos with git. very frustrating.
Asked by jeff peery:

Hello, Below is the error message returned when pushing/pulling to git. I didn't change anything. Just got in work today and things are totally broken. I am using Mac OSX High Sierra, 10.13.6

""" git@github.com: Permission denied (publickey). Fatal: Could not read from remote repository. """

I tried to delete my account in Sourcetree preferences, and recreate. I double checked my account user name by logging directly into GitHub.com - no problem. I tested Sourcetree on other machines in my office (Windows), they work fine.

I then attempted to downgrade from 2.7.3 to 2.6. this also didn't work. I see there are numerous threads on your forums regarding this, and this seems to be an ongoing bug. I am totally stuck and cannot proceed with my work.

What is the way forward. Thanks in advance!


Answers:
author: Manju
body: Please check if the ssh-agent has your keys loaded. If not, please add them to the agent.

Run below commands in terminal to do so,

To check if keys are loaded:

```
ssh-add -l
```

To add keys to agent:

```
ssh-add <path_to_key>
```

more like,

```
ssh-add ~/.ssh/id_rsa
```

Key in the passphrase used while generating the ssh key and you should be good to go.

comments: author: jeff peery
body: Hi, thanks for the response!

Is this relevant if I am using HTTPS?


author: jeff peery
body: I pasted below the full error. I hope that is helpful. Still unable to use SourceTree. I'm using the HTTPS mode, not SSH.

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

Completed with errors, see above


author: Manju
body: This definitely isn't an error you should see with https. Can you check the account configuration in Sourcetree and also verify that the remote URL in the repository is indeed https?


author: jeff peery
body: that was it. looks like perhaps when Sourcetree updated it clobbered the URL's for all my repo's. I reset to https now all is well. thanks for the help.
Why does Sourcetree keep prompting for username/password?
Asked by wrakocy:

Hello,

I've seen this issue mentioned a few times throughout the forums, but the solutions that I've found there do not seem to be working for me.

In short, I use Sourcetree all day long and make frequent commits. Each time I commit (or pull) the app prompts me for my username and password.

Can someone please advise?

Thanks!

-Bill


Answers:
author: Mikael Sandberg
body: Hi Bill,

Welcome to the Atlassian Community.

When you get prompted for username and password, is it Git Credential Manager for Windows that is prompting it? If that is the case you can turn it off by running these two commands:

    git config --system --unset credential.helper
    git config --global --add core.askpass ""?

comments: author: wrakocy
body: Yup, that seems to have done the trick.

Thanks so much for the lightning fast support!!


author: wrakocy
body: Sorry, scratch that. I restarted Sourcetree and hit the same problem. Ran the above commands in gitbash.

In answer to your original question yes it appears to be Git Credential Manager for Windows that is prompting me.

Thanks!


author: wrakocy
body: Here is a screenshot, just for the record:

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


author: wrakocy
body: OK, so after many abortive attempts to address the problem, I finally came across this little nugget about three quarters of the way toward the end of the Git Credential Manager help file (located on my machine here: C:/Users/\[myusername/AppData/Local/Atlassian/SourceTree/git_extras/git-credential-manager.html):

**Q: Why doesn't SourceTree use the credentials in the GCM?** {#toc-hId-1824020283}
-----------------------------------------------------------------------------------

**You need to configure SourceTree to use the version of Git installed for the entire system. By default, SourceTree uses a local copy of portable Git.**

**To fix this go to 'Tools \> Options \> Git' and click the 'Use System Git' button.**

My button just said "System", not "Use System Git", but it did the trick, happy to report. Now if I could just have the 4 hours I spent digging for this back ... :/


author: wrakocy
body: Final note, and just to lend weight to the above solution, I had the exact same problem on my Mac (OS X), and the same solution did the trick. For what it's worth. Out...
i am unable to login to sourcetree app using atlassian account
Asked by Shruti Samant:

Error message is: "Something went wrong while attemping to validate your credentials"


Answers:
author: minnsey
body: Hi  

The component used to handle that process relies on internet explorer and its configuration.  

Essentially if you can login to <https://id.atlassian.com> using IE you should be able to complete the process  

Best advice as of today for registration webview issues with IE:

1. open Internet Explorer
2. open the Developer tools, f12
   1. set the Browser Mode 10
   2. set the Document Mode Standards
3. open Cog/Internet options
   1. ensure the following settings are enabled
   2. Misc/Access data sources across domains
   3. Misc/Allow META_REFRESH
   4. Scripting/Active Scripting

v3.0 which is currently in beta provides an alternative process that does not rely on IE.


author: Manju
body: Is this on macOS or windows? Do you have any more information that you can provide?

comments: author: Shruti Samant
body: Hi,

On windows, PFB screenshot of error.![SourceTreeError.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/32279i893F8B445B2CD8F2/image-size/large?v=v2&px=999 "SourceTreeError.PNG")


author: Shruti Samant
body: On windows 7 professional
Cannot push from sourcetree to bitbucket because password changed
Asked by pmoura01:

I had to change my Atlassian bitbucket password because your site was hacked and now pushes from sourcetree get rejected because "Invalid username or password". I edited the password for Git Saved Passwords in SourceTree-\>Tools-\>Options-\>Authentication and this does not fix the problem


Answers:
author: pmoura01
body: This seems have solved the problem - <https://community.atlassian.com/t5/Sourcetree-questions/How-to-update-HTTP-S-credentials-in-sourcetree/qaq-p/297564>
Github 2FA personal access token doesn't work
Asked by Pee Cha:

Hey i have 2FA enabled on my github account and i can't get it to work under windows Sourcetree 2.6.10.

I have followed this guide [two-factor-authentication-2fa-with-github-in-sourcetree](https://confluence.atlassian.com/sourcetreekb/two-factor-authentication-2fa-with-github-in-sourcetree-402033499.html?_ga=2.141219506.1873262930.1536740170-295584446.1536740170) but to no avail.

I am getting Authentication failed: Failed to check login for user \[my_username\] user/emails was not found.

Authentication is set to Basic and protocol is HTTPS.


Answers:
author: Mike Corsaro
body: Hello! You won't be able to use basic auth with 2FA -- you'll need to use the OAuth option. Could you try that and let me know if it works?

comments: author: Pee Cha
body: Hi, thanks for the reply. OAuth works.


author: Chris Boudreaux
body: Which information goes into which fields in SourceTree to make SourceTree v4.0.2 (236) work with Github 2FA?


Tags: 2-factor-authentication

github
Error with hg flow action: failed to import extension hgext.hgflow
Asked by nscherer:

I am attempting to start a new feature branch with Repository -\> Hg Flow -\> Start new feature. I enter the name and click OK, and get this error:

hg flow -y feature start GPS  
\*\*\* failed to import extension hgext.hgflow from C:\\Users\\Nate\\AppData\\Local\\SourceTree\\app-2.6.10\\extras\\hgext\\hgflow\\hgflow.py: 'module' object has no attribute 'command'  
hg: unknown command 'flow'

I'm on version 2.6.10.0, Mercurial 4.7, Windows 7 64 bit. Hg Flow is the only reason I use SourceTree, so if it's broken I'll be uninstalling...


Answers:
author: minnsey
body: Hi We need to update the version of hg-flow we bundle to support Hg 4.8, it will be in an upcoming release


author: minnsey
body: Hi  

Have you recently updated to Hg 4.7 was it working before you upgraded? We currently test against and ship with 4.6 so we will check if there is any issue with the hg-flow extension and v4.7

comments: author: Chris Donaldson
body: Has this issue been resolved. I am still seeing the issue when using Hg 4.7 and SourceTree 2.6.10.0? The Hg Flow doesn't work properly.


author: s13sb4
body: Having a similar issue with HG 4.8 and sourcetree 3.0.8


author: redshed
body: I think I resolved this but I don't remember if it was by installing a newer or older version, or what. Sorry.


Tags: hg-flow
SourceTree virtualisation
Asked by Sam:

I am looking to virtualise SourceTree using a platform such as AppsAnywhere, but wanted to check if this goes against the T\&Cs associated with the software.


Answers:
author: bgannin
body: Hi Saima,

Virtualization doesn't violate our T\&C; we only require it to be properly registered with an Atlassian account (typically during setup.)

Thanks,

Brian Ganninger  
Product Manager, Sourcetree
Can't push commit to Github
Asked by Kazuto Kirigaya:

When I try to push a commit to github, this error shows below the loading bar:![Screen Shot 2018-09-10 at 9.18.36 AM.png](/t5/image/serverpage/image-id/31927iC96F4CDDC8985AA0/image-size/large?v=v2&px=999 "Screen Shot 2018-09-10 at 9.18.36 AM.png")Originally i thought it had to do with the SSH, but I generated a new key and associated it to my account, so it shouldn't be the problem. (however it might be possible that I did it incorrectly..) any help would be appreciated!


Answers:
author: Manju
body: Are you able to push via terminal?

Can you please check if your keys are loaded on the ssh agent of your Mac?

Run the following command to check for loaded keys,

```
ssh-add -l
```

If this does not list the key you are looking for, please add it using command below

```
ssh-add <path_to_your_key>
```


Tags: github

mac
Why is Sourcetree so buggy?
Asked by mabader:

We are using Sourcetree at the company and we have a very old version .. like 1.6 or something. It is really slow.

On the Atlassian Summit Europe 2018 in Barcelona I met someone from Sourcetree and he told me that the speed-issues have been mainly solved with the newer versions. So I tried it out just now with my private PC.

Oh my god - that new version 2.6.10 is so unbelievably buggy it feels like a very early alpha. Are you kidding me, who decided to release that??

Also I can't use the software anymore if I don't have an Atlassian account with which I log in during the installation process? Are. You. Kidding. Me?

Ok, Sourcetree is dead for me for now. I'll be using the version control from IntelliJ IDEA - that works perfectly and blazingly fast.

The sad thing is that I got a really good impression of Atlassian on the summit and I was hyped. But my Sourcetree experience is not helping here ...

I mean what is the strategy behind these moves? Why only with login?

Why is the software so unbelievably buggy?

Any answers from Atlassian, please?


Answers:
author: AKrizan
body: I'm actually thinking of stopping using this app in our company, because in the last month I've been running around figuring out how to fix all the bugs happening.  
Right now I can do everything but finish a feature, which is really odd. If I don't find a solution till the end of the day this might just be it for our SourceTree usage.

comments: author: mabader
body: You know the sad thing is that I want to give Atlassian a chance and really want to like them. But they are making it so hard ...


author: Manju
body: Have you tried out our latest version that is in a [public beta](https://product-downloads.atlassian.com/software/sourcetree/windows/beta/SourceTreeSetup-3.0.0-beta-1930.exe?_ga=2.4654771.1864480005.1536590711-1178943601.1520311947)?

comments: author: mabader
body: No, I downloaded the oficial version
SourceTree Integration to Bitbucket Server not working from Windows (works from Mac)
Asked by Tobias Br?hlmeier:

Hi

I've installed Bitbucket Server, and it seems to work quite fine.

I've installed SourceTree on MacOS, and I'm able to connect to my Bitbucket Server.

I've installed SourceTree on Windows, but a connection is not possible, but instead, I got an error message "Failed to check login for user \[tobias\]".

Interesting: If I enter a wrong password for my user "Tobias", I get another error message: "Failed to check login for user \[tobias\]: You do not have permission to access URL '<https://wiki.mycompany.ch/bitbucket/rest/api/1.0/users/tobias>' please check the user credentials associated with this account. The request returned with status code 'Unauthorized'."

This is my setup:

**Server:**

* Bitbucket 5.13.1 installed on Mac OS 10.11.6
* DBMS: PostgreSQL 9.3, installed on the same computer
* Crowd, Confluence and JIRA installed on the same computer
* Same DBMS is used for JIRA, Confluence and Crowd
* User management with Crowd
* Secured with nginx and valid certificates
* git 2.18.0 (coexists with original git from Mac OS)

**Clients:**

* Mac OS: SourceTree 2.7.6
* Windows: 2.6.10

Why is it working with SourceTree for Mac, but not on SourceTree for Windows?

Any ideas? Thanks, Tobias


Answers:
author: minnsey
body: Hi  

There is an issue in Sourcetree for Windows when connecting to Bitbucket Server instances where the URL includes a context path e.g. https://myserver/bitbucket vs https://mybitbucket/

This is fixed in the upcoming 3.0 release.


Tags: bitbucket

bitbucket-server

server

windows