This link shows a list of Portuguese demonyms, and someone born in Oporto is said to be a "portuense", or "portense" or "tripeiro". When I called a native portuense "tripeiro", however, he seemed not to like it.
Is "tripeiro" a pejorative term?
Generally it is indeed used pejoratively, but not always. For instance, it's clearly pejorative in the first video (from supporters of Sporting CP, a club from Lisbon), but not in the second (FC Porto's claque). Somewhat like "nigger" in the US (generally considered the most offensive word there), it is quite different if it is used by a member of the group rather than by an outsider.
"Tripeiro" also means "tripe eater". There's a famous dish from Porto called "tripas à moda do Porto" or simply "dobrada" (which just means "tripe"):
Being a newspaper corpus, you will rarely find slurs in it, but CETEMPúblico returns a total of 185 occurrences for the "tripeiro" lemma. In most of them, there's not a trace of negative connotation, it's just a more colorful way of saying "portuense".
The pejorative connotation comes from the idea that someone who eats tripe is unsophisticated. So if you don't subscribe to that prejudice (or just think that the "alfacinhas" are just elitist pricks), it's quite easy to actually "own" the slur. This quote from CETEMPúblico is interesting because the speaker acknowledges the unsophistication:
Se antes era -- Não penses, não fales!, agora é -- Fala para aí!, o que, com o eruditismo tripeiro de que me orgulho, pode ser traduzido por -- Vai-te f... !