Add url type option and improve robustness

This contains two commits. The first adds a custom option to decide which url type to use ("git://", "https://", or ssh) instead of just using the ssh url. The second makes it give a better error message if the `git clone` command fails.
I will fix it, but this should be combined with the message call below.