Let $y = mx + c$ be the equation of the tangent. Then substituting into $y^2 = 8x$, we get
\[(mx + c)^2 = 8x,\]which expands as $m^2 x^2 + 2mcx + c^2 = 8x$, or $m^2 x^2 + (2mc - 8) x + c^2 = 0$. Since $y = mx + c$ is tangent to the parabola, this quadratic has a double root, which means its discriminant is 0:
\[(2mc - 8)^2 - 4m^2 c^2 = 0.\]This expands as $4m^2 c^2 - 32mc + 64 - 4m^2 c^2 = 0$, which simplifies to $32mc = 64$, or $mc = 2$. Then $c = \frac{2}{m}$.
Substituting $y = mx + c = mx + \frac{2}{m}$ into $x^2 + y^2 = 2$, we get
\[x^2 + \left( mx + \frac{2}{m} \right)^2 = 2,\]which expands as
\[x^2 + m^2 x^2 + 4x + \frac{4}{m^2} = 2.\]This simplifies to $(m^2 + 1) x^2 + 4x + \frac{4}{m^2} - 2 = 0$. Since $y = mx + \frac{2}{m}$ is tangent to the circle, this quadratic has a double root, which means its discriminant is 0:
\[4^2 - 4 (m^2 + 1) \left( \frac{4}{m^2} - 2 \right) = 0.\]This simplifies to
\[16 - 4 (m^2 + 1) \cdot \frac{4 - 2m^2}{m^2} = 0,\]so $4m^2 - (m^2 + 1)(4 - 2m^2) = 0$. This expands as $4m^2 - (4m^2 - 2m^4 + 4 - 2m^2) = 0$, which simplifies to $2m^4 + 2m^2 - 4 = 0$, or $m^4 + m^2 - 2 = 0$. This factors as $(m^2 - 1)(m^2 + 2) = 0$. Since $m^2 + 2>0$, $m^2 - 1 = 0$, so $m^2 = 1$. Since $-\frac{a}{b} = m>0$, $m = 1$. Then $c = \frac{2}{m} = 2$.
Hence, the equation of the common tangent is
\[y = x + 2,\]which we can write as $x - y + 2 = 0$. Then $a = 1$ and $b = -1$, so
\[3a^2 + 2b + 1 = 3 \cdot 1^2 + 2 \cdot (-1) + 1 = 3 - 2 + 1 = \boxed{2}.\]