Sourcetree was unable to create the remote repository
Asked by Elliander Eldridge:

I have remote repositories enabled. I can see what I have on Github, but when I try to create a repository this is the error I get "Sourcetree was unable to create the remote repository".  

I am using OAuth authentication, with protocol HTTPS, and I have my github username set as the default account for github. I also tried re-authenticating twice:  

Authentication Successful {#toc-hId-1822020230}
-----------------------------------------------

SourceTree has been successfully authenticated. You may now close this page.  

However, this somehow crashed source tree. then EVERYTHING I did since installing SourceTree was undone and had to start all over again \*grumbles\* oh, but worse! After I'd give it my password it would do nothing! SO I had to delete my username and start from the very very beginning!  

\*sigh\* Anyway, I got everything set up again, switched it back to OAuth, and refreshed OAuth token yet again, and it says that authentication is OK , I set it to default again, and once again tried to create a repository...  

"Sourcetree was unable to create the remote repository"  

I made sure there were no spaces in the name, I made sure it's created as private, I added a description, but nothing works.   

Oh, and I configured SSH in Gitbash, and added my public key id_rsa with OpenSSH. I also tried updating the embedded GIT, and switching between embedded GIT and system GIT.  

I'm really starting to hate SourceTree, and I haven't even had a chance to use it yet...   

Note: I am forced to use Version 2.4.8.0, because all later versions require a version of .NET that my computer will never support.   

**EDIT** : I made some progress on my own, but now it creates the repository, then says "Failed to clone repository" and it happens no matter what I name it.   

fatal: destination path 'C:\\Users\\Elliander\\Documents\\repos\\01_BuildingEscape' already exists and is not an empty directory.  

This is a weird error to get, because I want it to upload the directory to github, not create an empty folder and then overwrite my work.   

**EDIT 2:**For this last issue, the problem seemed to have been caused by creating the directory first. For the version I have to use it seems that I have to create the repository with an empty folder first, then move the contents back into it, and then it will work as I need it to


Answers:
author: Elliander Eldridge
body: To answer my own question, I ultimately had two problems: First, was that I attempted to create a private repository on Github, but didn't realize that they charge for that service and the error message wasn't meaningful. Then, I had some slight tweaking with SSH settings (I had to make sure to add it to my Github account, not just in SourceTree)  

then, finally, the problem that had me scratching my head the longest: For whatever reason, I cannot create a repository from a folder that contains files. I have to first remove all the files from the directory, then I could create it properly, and then I can move the files back and commit/push properly.  

I'm guessing that my larger issue here is that I am forced to use an older version, but there is nothing I can do about that. It bites that it will never get any better for me (not unless they start supporting a lower version of .NET again) , but at least now I have it all working with only around 2 crashes an hour that will never get fixed.


Tags: developer

repository