How do I solve: "Invalid URI: Host name could not be parsed"?
Asked by abibtj:

I am trying to install Sourcetree on a Windows 10 machine. But I am not able to proceed beyond the point where I need to specify RootURL: I have tried different formats of URL but I keep getting the following error:

Invalid URI: Host name could not be parsed.

I various URLs including this: https://abibcode@bitbucket.org/abibcode/

I will appreciate if someone can help me out.

Thank you.


Answers:
author: abibtj
body: I found an alternative. I used Atlassian account to login. Thank you.

comments: author: Ana Retamal
body: Glad you figured that out!

Have a nice day :)

Ana


author: David Parham
body: i am getting nowhere. i have a bitbucket account, i can log in and see files. i install Atlassian, i go to Remote\>Add an account...i get 3 options, Bitbucket, Bitbucket Server, GitHub. i have a bitbucket account. i try to log in to Atlassian using bitbucket credentials., i get: Invalid URI: Host name could not be parsed. what do i do? if i use Atlassian account, how? i used to log into Atlassian but how would i do it now on this fresh install? it never asks me to Log In to Atlassian, neither does it allow me to choose Atlassian. i loathe using Atlassian, used to always freeze on me. anyone recommend a good set of instructions?


author: Nic Brough -Adaptavist-
body: That is incredibly hard to read as a rambling stream of consciousness, could you at least attempt to punctuate and structure your text next time?

\>i have a bitbucket account, i can log in and see files.

Log into what? Your installed server or the Cloud? A lot of the rest of your questions depend on us knowing that.

\>i install Atlassian,

Atlassian is an organisation, not software. What application have you installed?


author: David Parham
body: lol, my apologies. Can you advise re SourceTree? Its Help displays Atlassian copyright 2012-2018, SourceTree v2.6.10. If you support this product then read on: I have a bitbucket account, i can log in there just fine, into bitbucket.org. Next, I start my "SourceTreeSetup-2.6.10.exe", it's already installed so the SourceTree v2.6.10 windows desktop client opens. Nothing is configured, I bypassed all that due to errors or inability to authenticate. I do not see SourceTree in my Windows 10 apps list, perhaps because it is not fully configured, I don't know. I am actually starting it via the .exe file. But it opens, now I go to "Clone from a remote repo". I enter my remote repo address: git clone git@bitbucket.org:domain/repofoldername.git that i copied from Bitbucket. Then in SourceTree I try using protocols HTTP and SSH, enter id and pw i use to log into my remote repo, and I get the error, "Invalid URI: hostname could not be parsed".  

I hope this helps, at least to where you can direct me with more questions towards getting a remote repo cloned to my local machine. Thank you!


author: David Parham
body: Additional information: when trying to Clone a remote repo, I have copied the repo URL from bitbucket \[SSH\], then in SourceTree "Edit Hosting Account" I use Hosting Service: Bitbucket, Host URL: <https://bitbucket.org/> \[autopopulated and grayed out\], Protocol: SSH, then Basic authentication with my username, then password. If I copy the repo address using HTTP, I try that on the Host Account window - SSH and HTTP each fails with the Invalid URI error.


author: David Parham
body: UPDATE - the ID I use to log into Bitbucket resolves to an ID that is different, not sure why I set it up that way; but I tried that other "resolved" ID from Bitbucket, and am a step further in the process, I got "Authentication OK". Now i need to study some tutorials on how to use SourceTree.  

Thank you for your patience. I've been frustrated with Version Control for over a year here, and really want to be good at it. I just got my PC rebuilt and wanted to start afresh, and the Authentication weirdness with the 2 ID's had me stumped and frustrated all over again.


author: David Parham
body: SOLVED. adding to the complexity of all this is the fact that i log into Bitbucket with an email address which then resolves to an ID; then there are 2 repos in the account with the same name, and each is associated with its unique ID. not that a poorly constructed Bitbucket account should be part of anyone's instructions, but it's something else to think about when troubleshooting. i managed to get through it. once i knew which id was associated with the correct repo, it cloned down to my local box. thanks for being there ;}.


author: David Parham
body: I had 15 minutes of material go missing from this post, adding it back quickly - I am trying to Clone a Repo:  
![SourceTree\[1\]-clone.png](https://community.atlassian.com/t5/image/serverpage/image-id/29292i82C1CA76E775523A/image-size/large?v=v2&px=999 "SourceTree[1]-clone.png")  

It shows that the repo type is a Git Repository. When I press Clone, it goes quickly back to my main tab where Working Copy shows no files, in fact no files show anywhere. Then when I try a Pull - ![SourceTree-pull.png](https://community.atlassian.com/t5/image/serverpage/image-id/29293i3E5EE1C22BAF3F38/image-size/large?v=v2&px=999 "SourceTree-pull.png")  
I then get an error:![SourceTree-pull2.png](https://community.atlassian.com/t5/image/serverpage/image-id/29291iE901F0E15C7F5020/image-size/large?v=v2&px=999 "SourceTree-pull2.png")  
I simply want to open SourceTree, Clone a Repo, bring files down to my local from remote, edit files locally, then Stage and Commit files to remote. Can you help me with this? Thank you!

comments: author: David Parham
body: I believe I needed to do a Fetch, just tried that:![SourceTree\[3.5\]Fetch.png](https://community.atlassian.com/t5/image/serverpage/image-id/29294i29DB768CF2EB76D3/image-size/large?v=v2&px=999 "SourceTree[3.5]Fetch.png")  

And got this msg:![SourceTree\[4\]Fetch.png](https://community.atlassian.com/t5/image/serverpage/image-id/29295i492D22033614DCD0/image-size/large?v=v2&px=999 "SourceTree[4]Fetch.png")Now, Working Copy is still blank; but REMOTES has "origin" but it shows no files.


author: David Parham
body: So, I did this: Tools\>Options\>Git\>and tried Embedded, updating Embedded - to no avail. Chose System, and that msg at least shows something better - yet my origin is still blank:![SourceTree-Fetch1.png](https://community.atlassian.com/t5/image/serverpage/image-id/29302i416520D1CC3F63E9/image-size/large?v=v2&px=999 "SourceTree-Fetch1.png")

But again, origins is blank. Does anyone there have a set of working instructions?