While researching my book, I reread Audubon's Quadrupeds.
Bachman and Audubon kept many animals in captivity (including elk) so Audubon could paint them.
Some, like flying squirrels, not surprisingly made good pets. But the porcupine was a surprise.
Apparently, porcupine spines are harmless when the animal is not alarmed. The spines are flattened against the animals skin. Porcupines are affectionate and rub against peoples' legs, like cats, and there's no danger of getting stuck with the spines.
The spines stand up when the animal is frightened.
Audubon said they ate every kind of vegetable food, including apples, but liked bread best.