Likely from clore (“to close”) + porte (“door”), from its habit of rolling into a ball. Another possible derivation is from an unattested *croteporque, mirrored in Occitan porquet de crota (“woodlouse”, literally “cave-pig”). In any case, the analysis in the first proposal is probably responsible for the figurative extension of the word to "porter, concierge".