Fix https git remotes and avoid weird errors when the git repository does not come from github