For a (not necessarily affine) scheme $X = \bigcup_{i=1}^n X_{f_i}$, does $(f_1, \ldots, f_n) = (1)$ in $\mathcal{O}_X(X)$? This is of course true in the affine case, so it seems like it should be true in general, because $\mathcal{O}_X(X)$ should be "smaller" for a non-affine scheme than for a similar affine scheme (e.g. all global sections over a projective scheme are constants).  Just to be clear on notation:
$X$ is a scheme, not necessarily affine.
$f_1, \ldots, f_n \in \mathcal{O}_X(X)$.
$X_f := \{ x \in X \; | \; f_x \not \in \mathfrak{m}_{X, x} \}$, where $\mathfrak{m}_{X, x}$ is the maximal ideal of the stalk $\mathcal{O}_{X, x}$
$X = X_{f_1} \cup \cdots \cup X_{f_n}$
Does it follow that $(f_1, \ldots, f_n) = (1)$ in $\mathcal{O}_X(X)$?
We have $(f_1|_U, \ldots, f_n|_U) = (1)$ in $\mathcal{O}_X(U)$ where $U \subset X$ is open affine, but I don't see how to extend this to all of $X$.
 A: No. Let $X = \mathbb{A}^2 \setminus (0,0)$. Then $\mathcal{O}(X) = k[x,y]$ and $X = X_x \cup X_y$. However, the ideal $\langle x,y \rangle$ in $k[x,y]$ is not $1$. 
The plane with a point deleted should be in your standard toolkit to test things against.
A: This is a long comment, which might lead to a counterexample.
The question is equivalent to: Let $f : \mathcal{O}_X^n \to \mathcal{O}_X$ be a surjective homomorphism of quasi-coherent modules on $X$. Is it also surjective on global sections? If $K$ denotes the kernel of $f$, the long exact sequence of cohomology groups associated to (*) $0 \to K \to \mathcal{O}_X^n \to \mathcal{O}_X \to 0$ tells us that a sufficient condition is that $H^1(X,K)=0$. Note that $K$ is a vector bundle of rank $n-1$, since (*) splits locally.
This shows on the one hand that some schemes satisfy the property (affine schemes and $\mathbb{P}^1$, perhaps someone can add more examples), but on the other hand it shows how to construct counterexamples: Find $X$ which admits some vector bundle $K$ which fits into some sequence (*) such that $H^1(X,\mathcal{O}_X)=0$, but $H^1(X,K) \neq 0$.
Probably there are already examples when $X$ is a variety which is covered by two open affines.
