Add support for the https for libgit2

re #6175
Implement the minor changes proposed

re #6175