Auto detect git protocol

No longer we will need to run cmake twice