Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to login to bitbucket

nmilliganmct July 11, 2017

Using basic authentication the error is:
unexpected character encountered while parsing value: T. Path ",line0, position 0.

10 answers

1 accepted

1 vote
Answer accepted
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 12, 2017

Hi Nancy! Can you elaborate your description a bit more so we can help you with this? Please let us know:

  • Are you getting this error when connecting directly to Bitbucket, or when trying to connect to Bitbucket from SourceTree?
  • Are you using Bitbucket Server or Cloud? If Server, which version?
  • What version of SourceTree and OS are you using?
  • What are the steps you're performing when you get this error? Can you send a screenshot?

Best regards!

Ana

nmilliganmct July 12, 2017

I've figured it out. Bitbucket.org won't take a user name any longer. Now it wants an email address. Ok, did that. However, when I try to login through sourcetree it seems to want to use my username. I kept trying to put my email address in there like bitbucket.org insists on.  So the issue is solved for me, but this is weirdly inconsistent and confusing.

 

  • Are you getting this error when connecting directly to Bitbucket, or when trying to connect to Bitbucket from SourceTree? 
    • When trying to connect to my remote repository on Bitbucket.
  • Are you using Bitbucket Server or Cloud? If Server, which version?
    • I'm using bitbucket.org.
  • What version of SourceTree and OS are you using?
    • 2.1.2.5 Windows 7
  • What are the steps you're performing when you get this error? Can you send a screenshot?



9 votes
Milton Plotkin March 17, 2022

I had this same error; and after several hours this is what fixed it (major thanks to user TrainLayout for step 3 and 5):

  1. Update SourceTree.

  2. Create app password in BitBucket. Make sure the name you give it is entirely lowercase! (When I did these steps, they didn't work until I did this).

  3. Manually delete all credentials in Sourcetree (Tools -> Options -> Authentication).

  4. Delete "C:\Users\<username>\AppData\Local\Atlassian\SourceTree\passwd". Keep SourceTree open while you do this.

  5. Attempt a push, wait for a popup asking for username/password, enter same username as used to create the app password and paste the app password.

Hopefully this should fix things.

EDIT: Another potential cause of this, is that when you copy+paste the password, you're accidentally including some additional hidden characters. I recommend pasting the password into Notepad, then copying it out of Notepad and into the password field to "scrub" any hidden characters out.

John Mullany
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 27, 2022

If Mr. Plotkin was in my town I'd buy him some beers. After not reading his steps carefully I then followed them letter by letter & it worked.

NOTE: Step 2......As mentioned, THE NEW APP PASSWORD NAME MUST BE ALL LOWER CASE!!!  

Like robertobergamini likes this
Luke Wendt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 28, 2022

This works, thank you!

Stephen Kennedy
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 29, 2022

Thank you, thank you, thank you! I was losing my mind trying to get this sorted out. This was exactly what I needed.

BrianChapman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 1, 2022

Thank you this helped me also!!
To be clear:
1) This worked for me adding "Basic" Credentials.  I still cannot get the OAuth mode to work.
2) It is the app password "label" that needs to be all lowercase, as you have no control over the content of the actual password.

In retrospect the error message "unexpected character encountered while parsing value: B. " is a clue.   The first uppercase letter in my app password label was "B".  My name.

Nicolas Sarmiento
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 12, 2022

Hi , I´m frustrated.. login should be simple. 

created app pass, ssh keys (openssh and putty) , trying every combination and still unable to login . 

win 10 , sourcetree 3.4.9 ,,

sourcetree.jpg

 

tried using username, email,  also both combined with bitbucket

also tired OAuth (even worse , does not returns from the localhost... request  )

 

console git works ok, but sourcetree feels impossible. any advise?

Nicolas Sarmiento
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 12, 2022

ok so app passwords only works with username , and not the email as user, ..  too many persons having these issues. maybe a comment in login page would make it much simpler.

Neil Jones
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 2, 2022

Thank you Mr Plotkin, for that clear explanation.  Excellent post.

Vanisree TV
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 10, 2022

Thanks ! it helped .

Andrea Clerici
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 14, 2022

I am still unable to login, I keep getting the same error ""unexpected character encountered while parsing value:" even after following these steps.

 

How can I work if I cannot log in?

Matvei Kars
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 10, 2022

Worked for me when I used only lower case letters for the app password name, no other symbols.

3 votes
Mohamed Laser
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 15, 2021

I had the same error because I enabled two-step verification. To overcome this issue you have 2 options:

1- disable two-step verification (not recommended).

2- create an app password and use this password to login in sorcetree.

Steps to create an app password:

1-  go to bitbucket, click on your avatar

2- choose personal settings

3- go to app passwords. choose create app password.

4- choose the permission associate with this password.

5- copy the generated password and use it to login in sourcetree (please take care that the password will be shown only in this step and you can't get it again).

ha222y
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 15, 2022

This solved it for me.

Like Mohamed Laser likes this
Christian Avila March 18, 2022

thanks Mohamed this solved the issue.

Like Mohamed Laser likes this
Deleted user March 29, 2022

Thanks! It works

Like Mohamed Laser likes this
FFS
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 15, 2022

This was the only thing that worked for me.

To clarify a little further. You have to use an app password generated after you disable two-step verification. If you reuse a previously generated password it will not work.

Two-step verification can be enabled afterwards.

Like Mohamed Laser likes this
3 votes
Pavel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 27, 2020

Hi,

I have the same issue. Have tried username and email already, but no success, get the same error regardless of the login name variant.

I use Sourcetree 3.3.7 on Windows 10. Have an SSH key and use Basic authentication method. And I use Bitbucked Cloud.

Screenshot_012720_122428_PM.jpg

Screenshot_012720_122801_PM.jpg

Simon Harrison
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 7, 2020

@Pavel  Did you get a solution to this as one of my 2 computers has started having the same error?

1 vote
Christian Avila September 13, 2021

I am getting the same error and none of the suggestions provided in this community are working:SourceTreeErrors.PNG

Mohamed Laser
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 15, 2021

.

0 votes
Michał S
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 10, 2022

On bitbucket.org go to left panel and click Personal Preference. In Left panel then click App Passwords.  Create your password.

Go back to SourceTree and in the SourcePath paste "https://USERNAME:APP_PASSWORD@bitbucket.org/workspaceID/reposlug.git". Where USERNAME is your bitbucket username and the APP_PASSWORD is the password you have generated in previous step.

This worked on my Windows, after 2h fight :(

Bjoern Thomsen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 27, 2023

Thanks Michal, now it works fine!! 

0 votes
ttaranov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 24, 2022

can't login into sourcetree for bitbucket - failing with these "encountered while parsing value"... due to special character in passwords? Really?

0 votes
cleverstarfish
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 23, 2022

I solved this same issue by removing $ and # characters from my password. 

0 votes
axb2035
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 6, 2021

I am getting the same problem and an a more meanigful error message and how to resolve the sitution would assist. I've tried all combinations of username and email, HTTP and SSH and tried logging out and it again as per the previous post without no success.

I am trying to set up a App password using the instructions on this page https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/

When try to complete the step: Enter the app password you just created as your Password. If you're on Windows, you'll need hit Refresh Password first.

I do so and I get this error:

2021-05-07 - sourcetree_error.png

  • Are you getting this error when connecting directly to Bitbucket, or when trying to connect to Bitbucket from SourceTree?
    • Connect to BB from SourceTree (latest version 3.3.8)
  • What version of SourceTree and OS are you using?
    • SourceTree version 3.3.8 on Windows 10 OS 64-bit

Any assistance appreciated.

0 votes
neualex October 26, 2020

@Ana Retamal Can you provide an official solution to this error message Unexpected character encountered while parsing value: T.Path '', line 0, position 0.?

  • Are you getting this error when connecting directly to Bitbucket, or when trying to connect to Bitbucket from SourceTree?
    • Connect to BB from SourceTree (latest version 3.3.4)
  • Are you using Bitbucket Server or Cloud? If Server, which version?
    • BB Cloud
  • What version of SourceTree and OS are you using?
    • SourceTree version 3.3.4 on Windows 10 OS 64-bit
  • What are the steps you're performing when you get this error? Can you send a screenshot?
    • See SSH settings below, I notice if I logout from BB Cloud and refresh the OAuth token in SourceTree which prompts me to re-authenticate in BB Cloud along with 2FA code and I try again to authenticate using Basic, then using username or email works as shown below.

ssh-1.jpg

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events