It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Sourcetree: ÅÄÖ in Windows Account name cloning from Bitbucket

Hi,

 

Trying to clone a HG-repo, i get this error: 

Command: perl.exe "C:\Users\Anders Brohäll\AppData\Local\SourceTree\app-3.0.15\tools\svn.pl" info https://whoever@bitbucket.org/whatever/whatever.web
Output:
Error: System.ComponentModel.Win32Exception: The system cannot find the file specified

Command: hg identify extensions.hgext.hgsubversion=! https://andersbrohall@bitbucket.org/whatever/whatever.public.web
Output:
Error: *** failed to import extension mercurial_credential_manager from C:\Users\Anders Brohäll\AppData\Local\Atlassian\SourceTree\hg_extras\mercurial_credential_manager.py: [Errno 2] No such file or directory: 'C:/Users/Anders Broh\xc3\xa4ll/AppData/Local/Atlassian/SourceTree/hg_extras/mercurial_credential_manager.py'
*** failed to import extension hgext.hgflow from C:\Users\Anders Brohäll\AppData\Local\SourceTree\app-3.0.15\extras\hgext\hgflow\hgflow.py: [Errno 2] No such file or directory: 'C:/Users/Anders Broh\xc3\xa4ll/AppData/Local/SourceTree/app-3.0.15/extras/hgext/hgflow/hgflow.py'
abort: http authorization required for https://bitbucket.org/whatever/whatever.public.web

Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://whoever@bitbucket.org/whatever/whatever.public.web
Output:
Error: fatal: ArgumentException encountered.
An item with the same key has already been added.
remote: Mercurial (hg) is required to use this repository.
remote:
remote: https://confluence.atlassian.com/x/vLRCMw
fatal: unable to access 'https://whoever@bitbucket.org/whatever/whatever.public.web/': The requested URL returned error: 405

 

I'm guessing that the mercurial extension of Sourcetree doesn't work well with the 'ä' in my Windows account catalogue. No?

When can I expect that to be fixed?
Can I somehow make it work by adjusting the perl script in the meantime?

 

Thanks,

Anders

3 answers

0 votes
Mike Corsaro Atlassian Team Jan 15, 2019

Hello! This is probably an unintended result of a security fix we previously shipped.

Could you first see if the file it's referring to actually exists?

C:\Users\Anders Brohäll\AppData\Local\Atlassian\SourceTree\hg_extras\mercurial_credential_manager.py

 

If it does exist, then you can probably work-around this issue by just running the command yourself via the command-line/terminal (make sure you're in the right directory first!)

hg clone https://whoever@bitbucket.org/whatever/whatever.public.web

Yes, the file exists on disk. 

C:\Users\Anders Brohäll\AppData\Local\Atlassian\SourceTree\hg_extras\mercurial_credential_manager.py

 

I want to use SourceTree not the command line :)
... no command works in the UI as per now, neither clone/commit/push/pull etc. With similar errors.  

Can i downgrade to before the 'fix'?
When can i expect a fix for the fix to be released?

Like Marius Stanescu likes this

I have the same problem, but I think it's because of the space in the Windows user folder. I can't use any git commands on the repo (fetch, pull, push, etc).

Here is the full output for a command:

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper="C:/Users/Marius Stanescu/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/git-credential-manager.exe" fetch origin
C:/Users/Marius Stanescu/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/git-credential-manager.exe get: C:/Users/Marius: No such file or directory
C:/Users/Marius Stanescu/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/git-credential-manager.exe erase: C:/Users/Marius: No such file or directory
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/Archive360/FCA.Forklift/'

C:/Users/Marius Stanescu/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/git-credential-manager.exe get: C:/Users/Marius: No such file or directory
C:/Users/Marius Stanescu/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/git-credential-manager.exe erase: C:/Users/Marius: No such file or directory
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/Archive360/FCA.Forklift/'

C:/Users/Marius Stanescu/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/git-credential-manager.exe get: C:/Users/Marius: No such file or directory
C:/Users/Marius Stanescu/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/git-credential-manager.exe erase: C:/Users/Marius: No such file or directory
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/Archive360/FCA.Forklift/'

C:/Users/Marius Stanescu/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/git-credential-manager.exe get: C:/Users/Marius: No such file or directory
C:/Users/Marius Stanescu/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/git-credential-manager.exe erase: C:/Users/Marius: No such file or directory
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/Archive360/FCA.Forklift/'

Completed with errors, see above.

To work around this for now:

  • Install git-for-windows
  • Go to Tools > Options > Git
  • Under "Git Version" click "System"

 

@Anders Brohällthe same fix should work for you, but replace "git" with "mercurial" and download it here

Still not working :/

Im on SourceTree 3.0.15.
Using Mercurial 4.8.2 x64.
The repo is on Bitbucket. 

Screenshot 2019-01-31 at 12.25.38.pngScreenshot 2019-01-31 at 12.24.55.png

Mike Corsaro Atlassian Team Feb 05, 2019

Okay, here's a workaround that should work:

  • Create a folder that doesn't contain special characters and copy the contents of "C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree\hg_extras" into that folder
  • Open the file "C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree\hgrc_sourcetree"
    • Under the entry for "mercurial_credential_manager" set the path to the folder you created
Mike Corsaro Atlassian Team Feb 05, 2019

FYI: This appears to be an issue in Mercurial itself as modifying the global .hgrc file to point the credential manager extension to a folder with an "ü" and running from command-line also causes it to fail.

It does work, modifying the hgrc_sourcetree-file. However, it reverts to the original path when opening SourceTree. 

I need to modify the hgrc_sourcetree AFTER SourceTree opened. I need to modify it everytime I open it. Enervating.

When can i expect this to be working?`

I have the exact same problem. So it's still an issue in Sourcetree v3.1.3.

A big problem for us with special characters in our names :/

/Rune

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,902 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you