Dear all,
I am currently using Sourcetree 3.0.6-beta-2193 (the latest, it seems) on Windows 10 1709, with both embedded Git (2.18.0/LibGit2Sharp 0.24.0 + git-lfs v2.4.2) and Hg (4.6.2). I work behind a nasty proxy, which blocks many many things (including SSH) --- well, at least, it does not require authentication. I configured Sourcetree to use OAuth authentication for both Bitbucket and GitHub, and to use HTTPS as the preferred protocol.
When I try to clone a private repository, I get a handful of errors if the repository is a Mercurial one hosted on Bitbucket. In Sourcetree, I click on the + to open a new tab, then Remote, I select one of my repos (Sourcetree can easily retrieve the complete list), Clone. Then, Sourcetree fails to identify the type of repository, with these errors:
Command: perl.exe C:\Users\XXX\AppData\Local\SourceTreebeta\app-3.0.6-beta-2193\tools\svn.pl info https://tcuvelier@bitbucket.org/tcuvelier/YYY
Output:
Error: System.ComponentModel.Win32Exception: The system cannot find the file specified
Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper="C:/Users/XXX/AppData/Local/SOURCE~2/beta/GIT_EX~1/GIT-CR~1.EXE" ls-remote https://tcuvelier@bitbucket.org/tcuvelier/YYY
Output:
Error: remote: Mercurial (hg) is required to use this repository.
remote:
remote: https://confluence.atlassian.com/x/vLRCMw
fatal: unable to access 'https://tcuvelier@bitbucket.org/tcuvelier/YYY/': The requested URL returned error: 405
Command: hg identify extensions.hgext.hgsubversion=! https://tcuvelier@bitbucket.org/tcuvelier/YYY
Output:
Error: ** Unknown exception encountered with possibly-broken third-party extension mercurial_credential_manager
** which supports versions unknown of Mercurial.
** Please disable mercurial_credential_manager and try your action again.
** If that fixes the bug please report it to https://github.com/mminns/mercurial_credential_manager_for_windows
** Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32 bit (Intel)]
** Mercurial Distributed SCM (version 4.6.2)
** Extensions loaded: mercurial_credential_manager, rebase, transplant, extdiff, fetch, strip, mq, hgflow, shelve
Traceback (most recent call last):
File "hg", line 41, in <module>
File "mercurial\dispatch.pyc", line 90, in run
File "mercurial\dispatch.pyc", line 210, in dispatch
File "mercurial\dispatch.pyc", line 351, in _runcatch
File "mercurial\dispatch.pyc", line 359, in _callcatch
File "mercurial\scmutil.pyc", line 160, in callcatch
File "mercurial\dispatch.pyc", line 341, in _runcatchfunc
File "mercurial\dispatch.pyc", line 971, in _dispatch
File "mercurial\dispatch.pyc", line 727, in runcommand
File "mercurial\dispatch.pyc", line 979, in _runcommand
File "mercurial\dispatch.pyc", line 968, in <lambda>
File "mercurial\util.pyc", line 1553, in check
File "mercurial\util.pyc", line 1553, in check
File "hgext\mq.pyc", line 3599, in mqcommand
File "mercurial\util.pyc", line 1553, in check
File "mercurial\commands.pyc", line 2805, in identify
File "mercurial\hg.pyc", line 189, in peer
File "mercurial\hg.pyc", line 163, in _peerorrepo
File "mercurial\httppeer.pyc", line 987, in instance
File "mercurial\httppeer.pyc", line 951, in makepeer
File "mercurial\httppeer.pyc", line 871, in performhandshake
File "mercurial\httppeer.pyc", line 311, in sendrequest
File "urllib2.pyc", line 435, in open
File "urllib2.pyc", line 548, in http_response
File "urllib2.pyc", line 467, in error
File "urllib2.pyc", line 407, in _call_chain
File "urllib2.pyc", line 909, in http_error_401
File "mercurial\url.pyc", line 463, in http_error_auth_reqed
File "C:/Users/XXX/AppData/Local/SourceTree-Settings/beta/hg_extras/mercurial_credential_manager.py", line 437, in basic_http_error_auth_reqed
return basic_http_error_auth_reqed.orig(self, authreq, host, req, headers)
File "urllib2.pyc", line 887, in http_error_auth_reqed
File "mercurial\url.pyc", line 467, in retry_http_basic_auth
File "C:/Users/XXX/AppData/Local/SourceTree-Settings/beta/hg_extras/mercurial_credential_manager.py", line 428, in find_user_password
return self._pwd_handler.find_auth(self, realm, authuri, req)
File "C:/Users/XXX/AppData/Local/SourceTree-Settings/beta/hg_extras/mercurial_credential_manager.py", line 259, in find_auth
if username[0]:
IndexError: list index out of range
I do not have the same troubles with Git, be it on Bitbucket or GitHub: everything works fine.
Of course, I already configured the proxy in both Git and Mercurial (taking the same parameters as the ones used by my browser):
git config --global http.proxy http://nasty.proxy:8080
In my %USERPROFILE%\mercurial.ini:
[http_proxy]
host=nasty.proxy:8080
This proxy is also configured in Sourcetree (Tools > Options > Network), using a custom proxy. I checked "Add proxy server configuration to Git / Mercurial".
I feel a bit lost in all of this... Is there anything missing in my configuration? Or is it just that the proxy is blocking specifically Bitbucket? (I have access to the website through the proxy, if that helps.)
Thanks in advance!