Why is this cryptosystem insecure?
From the key creators point of view, notice that:$g_1\bmod p=1$ and $g_2\bmod q=1$.

Which means that $(g_1-1)\cdot(g_2-1)\bmod N=0$.

Which implies that $g_1-1$ and $g_2-1$ share a common divisor with $p$ and $q$.

To obtain $p$ we simply take $\gcd(g_1-1,N)$.

To obtain $q$ we simply take $\gcd(g_2-1,N)$, or $N/p$.

Because we have been able to factor the modulus using only the public keys and with no protocol error on the part of the implementer, this cryptosystem is insecure.