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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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
4,459,382
Community Members
 
Community Events
176
Community Groups

Cannot setup SourceTree, stuck at OAuth authorization

Edited

I started SourceTree today and was asked for my credentials. I entered them and it brought me to the OAuth authorization page but there is an error: 

Invalid redirect_uri

This integration is misconfigured. Contact the vendor for assistance.

So i did a full, clean install of the latest version of SourceTree and now I cannot complete the setup process as it is stuck at the OAuth authorization page with the same error as above. I need this working ASAP so any help is highly appreciated!

4 answers

1 accepted

I found a way to get SSH method working: 

  1. Uninstall SourceTree and delete the Atlassian and Sourcetree folders from AppData\Local.
  2. Copy the Atlassian and Sourcetree folders from AppData\Local on a PC where SourceTree is installed and working fine to your PC.
  3. Run the SourceTree installer, it should just open up SourceTree.
  4. Click Tools -> Create or Import SSH Keys
  5. Click generate and follow the instructions to move mouse around.
  6. Enter a passphrase and save the public and private keys. Copy the text from the public key in the PuTTY key generator window.
  7. Open Bitbucket and open your account settings, go to SSH and paste in the public key that you copied from the PuTTY key generator window.
  8. You will need to change the URL to use the new SSH format. This guide shows how to do it: https://confluence.atlassian.com/bitbucket/change-the-remote-url-to-your-repository-794212774.html
  9. Restart sourcetree and try fetch, first try might give error but second try worked fine for me.

Hope this helps someone.

Also, I recommend everybody to use SSH instead of HTTPS as a preventative measure.

@Seadna Smallwood Thanks, your solution worked for me. The last step didn't work well, after several Sourcetree restarts, the workaround was to close source tree, open an existent repository and edit the file ~\.hg\hgrc. Under [paths] replace the default OAuth link with the SSH link from bitbucket repository URL

Like Seadna Smallwood likes this

@Vadim Tofan thanks for pointing that out! I did this also but forgot to put it in the list! I'll edit my post now.

Like Vadim Tofan likes this
1 vote
Mikael Sandberg Community Leader Jun 05, 2019

This is a known issue and has to do with OAuth, the Bitbucket team is aware of it and are actively working to resolve it. Check https://bitbucket.status.atlassian.com for more information.

0 votes
Jimmy Seddon Community Leader Jun 05, 2019

Hi @Seadna Smallwood,

It looks like you might be running into this: 

https://jira.atlassian.com/browse/SRCTREEWIN-10965

While there isn't a posted solution for it yet, you might want to go vote, watch and comment on that issue.

Sorry I can't offer more help.

-James

Thanks, I voted on it. Will comment now.

Jimmy Seddon Community Leader Jun 05, 2019

@Seadna Smallwood - You might be right!  That or they are essentially the same thing but no one has investigated to see if they are the same root problem.

Yes neither issue has been assigned yet. I linked them as i think they are the same.

Like Jimmy Seddon likes this

I managed to get sourcetree running on my PC but still cannot fetch or pull. I have a laptop where it is running fine, I copied the Atlassian and Sourcetree folders from AppData\Local on my laptop to the same location on my PC. I then ran the installer again and SourceTree opened.

I cannot fetch however as it still asks for credentials and brings me to the Invalid redirect_uri error page.

Sorry when I say 'running fine' i mean that I don't have the OAuth/redirect issue.

So the issue is tied to the specific computer. I wonder is there a reg key that can be cleared or something. Or is there another location that I don't know about where is something that can be deleted.

Hi,

I have the same problem.

I installed sourcetree and registered bitbucket on one computer (with windows 10)

after that I tried install sourcetree on second computer (with windows 7) but it is no able to pass second step - registration,

when I click bitbucket web broswer opens new page with information "Authentication Successful"

but install stay in registration page.

I copied Atlasian and sourcetree directories from 1'st computer but stil the same...

I have the same issue

This is very frustrating that there is no solution for this!

Like Robert Ahlskog likes this

My workaround was to clone the repository into another folder. hope this helps you too. EDIT: this worked temporarely

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events