It appears that including login information in the URL is causing an error in UrlFetchApp. Please file a bug in our Issue Tracker. In the mean time, put the login information in the Authorization header and it should work correctly.
var response = UrlFetchApp.fetch(url, {
headers: {
'Authorization': 'Basic ' + Utilities.base64Encode(username + ':' + password)
}
});