Krishna and Satyabhama ( Sathyabhama ) shared a common paternal ancestor, Anamitra.
The rule according to rig Veda is that one cannot share a common paternal ancestor for 7 generations and maternal ancestor for 5 generations.
I had encountered this in a book on Rig Veda, but I am not able to recollect it.
Also Manusmriti 3.5 says:
"Marriage should he performed with persons not belonging to the same Pravara;—above the Seventh grade among his paternal relations;—also beyond persons of the same seed;—and above the fifth grade among maternal relations."
Animitra was at least 11 generations ago for Krishna (https://en.wikipedia.org/wiki/Vrishni)
Gotras I believe are an easy way to enforce this rule.
In case of kshatriyas, gotra-pravara is inherited from their purohita and not from a common ancestor hence krShNa-satyabAmA marriage is possible assuming both families had purohitas belonging to different gotra (in addition to 7/5 generation rule of shatapAtha brAhmaNa 1:8:3:6) :
Thence (if the sacrificer be a Ksattriya) they (the Brahma speakers) ask as to how the inauguration (diksa), which is, in the case of a Brahman being initiated, announced by the formula, ' the Brahmana is initiated,” should be promulgated in the case of the sacrificer being a Ksattriya ? The answer is, The formula, “ the Brahmana is initiated,” is to be kept when a Ksattriya is being initiated ; the ancestral fire of the Ksattriya’s house-priest is to be mentioned. This, this is certainly so.
 Having laid aside his own implements (weapons), and taking up those of the Brahma, and having thus become Brahma, by means of the Brahma form, he returned to the sacrifice. Therefore they should proclaim him as a Diksita, with the name of his house-priest’s ancestral fires, and invoke them also in the Pravara prayer.
The Ksattriya (when drinking the juice of the Nyagrodha) enters the form of the Brahma by the medium of another (not direct), viz, through the relationship of his purohita (with the Brahmans), his own Diksa (at which the king himself was made a Brahmana for a little while), and the Pravara of his Purohita.