Wednesday, 27 August 2014

Clone a Repository in SourceTree

I have not done much development for the last month.  This is because, in addition to being busy with other things, the repository for Diabolical on my main laptop became corrupt!  I have not had enough time to think about fixing it.  It's holiday time and despite the weather I have had some outside jobs to do including some work on my Land Rover.

I looked at the problem with SourceTree a couple of weeks ago and decided that the only way to fix the busted repository was to take a copy of my most recent changes that have not yet been pushed up, delete the old local copy of the repository and start again with a fresh download of the source.

The trouble is it's now over a Gig download so it's not a quick fix.  I also can't remember all the repository settings.  I use a quick work round for security issues and there are some very basic Getting Started answers on the support site but I decided to do some reminder screenshots to add to this article.

As long as the repository already exists on the server the process in SourceTree is easy.

Clone/New from the toolbar




Enter or select the source path




Select from the list on the server or select another server





Enter the local path to the folder to store the repository



You can select an existing empty local folder or manually add a new folder name which will be created


Press the clone button to download all the files from the repository

It may take a few minutes depending on the size of the repository and your download speed but then you will be ready to start working on your project.


Tuesday, 26 August 2014

Security Workround for SourceTree

SourceTree is easy to download and easy to install but getting the security working can be a bit tricky to start with.  This is made worse, if like me, you are pressed for time and sometimes behind an SSL aware man-in-the-middle firewall.



I kept getting an SSL certificate error when trying to clone a repository.  I am fairly sure this is due to not adding the SSH public key to the repository on the web site but at the time I was in too much of a hurry.

As I was having trouble I did a quick bit of searching and found an option to 'Disable SSL certificate validation...'



That got rid of my errors and allowed me to get on and download my repository.


For my open source and experimental projects the security is not critical but for more important projects I would suggest taking the time to configure SSH correctly.