Fix space encoding in password for git auth

Related to #2826
If passwords contains space character, ``urlencode()`` replace it with '+' sign, but as of RFC 3986 it should be '%20'. This PR fixes it and uses ``rawurlencode()`` instead.