Fix updating Git URLs with credentials in them

Allow urls with "@", for example git+https://user:pass@domain.com/repository.git

The code previously returned "domain.com/repository.git" instead of
"git+https://user:pass@domain.com/repository.git".