New Gitlab::UrlSanitizer.http_credentials_for_user method responsible
for generating a credentials hash from a user.
Signed-off-by: Rémy Coutable <remy@rymai.me>
The API was returning 500 when `nil` is passed for the `import_url`.
In fact, it was `Gitlab::UrlSanitizer.valid?` which was throwing a
`NoMethodError` when `nil` value was passed.