Auto detect git protocol

No longer we will need to run cmake twice
Merge pull request #914 from UV-CDAT/auto_detect_git_protocol

Auto detect git protocol