A charity ship carrying hundreds of people rescued in the Mediterranean said on Tuesday it had received permission to dock in Italy as European governments tried to agree where the migrants should go.