Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Authentication failed: Unexpected character encountered


Attempting to enter my credentials for Bitbucket into Sourcetree and I get the following error:

Authentication Failed

Unexpected character encountered while parsing value: Y. Path ", line 0, position 0.

I have confirmed that I'm entering the correct credentials. I've tried both my email address and my username. I've tried resetting my password.

I have seen the "Solution" thread that suggests using your email as a username -- this did not work.

I am on Sourcetree version 3.4.6, Windows 10 Pro.

Here's an image:




Updating Embedded Git via the Git options menu and deleting the passwd file from AppData\Local\Atlassian\SourceTree got me around the initial error message.

Now it's giving me this when I attempt to clone a remote repo:




Never mind. Tried to refresh my password again, and now I'm back to square one and the "solution" from my first edit now isn't working. I do, however, get the same error as in my initial Edit when I try to remotely clone the repo.



For anyone that experiences this issue in the future, I have a hunch that the problem was that my username contained a special character. I'm not certain, but when I instead cloned the repo via SSH, it was successful. The only thing I can think of was that somehow my username was the problem. The special character was a hyphen.

1 answer

EDIT: Just realized I should have just updated my initial post. How do you even delete answers? :/

Suggest an answer

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

Bug Fix: Sourcetree for Windows authentication error when updating to app password

Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...

62,672 views 128 27
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