Callback invoked immediately before we attempt to connect to the
given url. Callers may change the URL before the connection by
calling git_remote_set_instance_url
in the callback.
GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH
Payload provided by the caller
0 on success, or an error