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

"Unexpected character encountered..." error when attempting to add account to Sourcetree


I am getting the error

Unexpected character encountered while parsing value B. Path '', line 0, position 0

when attempting to set up Sourcetree for Windows linked to my private repository hosted on

2022-04-07 21_43_38-Sourcetree.png

This is a newly built PC with a fresh install of Windows 10, and I am no longer able to work on any of my projects...

I have tried all combinations of settings here (HTTPS, SSH, username, email, account password, app password) and none of them have produced anything different.

Does anyone have any thoughts on how I can resolve this issue?

1 answer

1 accepted

0 votes
Answer accepted

Hi there!
Try to create a new password in your profile  under : access management -> App passwords.
Select your preferencies about the utilize of this pwd and utilize it in Sourcetree for Windows ( remember to copy and save in a secure place becouse you cannot see again  ).

Have a nice day :)

Hi @Luciano Elias Santilli

I went in and created another app password with all the preferences I needed, entered it in this screen, and I seem to be okay now. I am able to log into Sourcetree and pull/push my work.

Note that I ran through the same process and set the same preferences as my previous app password (which did not work), so I am unsure why this new app password worked. And future users that run into this in the future may have to do the same?

But either way, thank you for the assistance! I think I should be good to go now.

Like Luciano Elias Santilli likes this

Set your app password for it but if app password doesn't work then open Atlassian in your default browser . Sometime the problem is because of browser . When we open Atlassian in non defaulted browser then it give an error "Unexpected character encountered..." . Hopefully your default browser  is google . so please try it on google .

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,049 views 127 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