Validating both git and https repos

Forgive me this if the regexp matched git only for a reason. Also, I never wrote a line of ruby so please verify :-P