Here is another great answer given by another of my friends:
Let $X$ be $\mathbb C, U_0$ be the open complement in $X$ of the closed disk $\bar D=\{z\in \mathbb C\vert \vert z\vert \leq1 \}$
and add a few open discs $U_1,\cdots, U_n$ of radius $\lt 1$ covering $\bar D$ in order to obtain an open covering $U_0,U_1,\cdots U_n$ of $X$.
Now let $[0]\neq[\omega _0]\in \mathcal H^1(U_0)\cong \mathbb Z$ be a nonzero cohomology class and denote $[\omega_i]=0\in \mathcal H^1(U_i)=0$.
The compatibility conditions are trivially satisfied because all intersections $U_i\cap U_j$ for $i\neq j$ are contractible, so that $\mathcal H^1(U_i\cap U_j )=0$.
Nevertheless we can't glue our cohomology classes $[\omega_i]$ to a global cohomology class $[\omega] \in \mathcal H^1(X)$ because the only global cohomology class on $X$ is $0\in \mathcal H^1(X)=0$, which can't restrict to $[\omega _0]\neq 0\in \mathcal H^1(U_0)$.