Help finding appropriate test when observations are non-independent

I have a data set consisting of data from 7 islands. I have measured the average gene flow between each pair of islands as well as the difference in temperature between each pair of islands. I want to know whether these to variables (average gene flow and "thermal mismatch" are correlated). However, because I have done all pairwise comparisons, each island is included in 6 separate comparisons and the observations are therefore not independent of one another (all pairwise comparisons among 7 islands equals 21 total observations).

I would greatly appreciate it if anyone could give me advise on how to deal with this issue. Basically, I cannot do a simple parametric test like a GLM or Pearson Correlation because the observations are not independent of one another. Are there other tests available that can deal with this? Thank you in advance!