Principal bundles with compact simply connected structure group over 2-manifolds I'm reading Thomas Friedrich's "Dirac Operators in Riemannian Geometry," where the following is stated (in the Remark on page 42 before section 2.2 begins, if anyone is following along with the reference at home):
"[L]et $P\rightarrow X=\mathbb{RP}^2$ be an $Spin(n)$-principal bundle. Since $$\dim(\mathbb{RP}^2)=2, \: \pi_1(Spin(n))=0, $$ this bundle has a section and is thus trivial."
He also remarks that, "The same effect occurs if we replace $\mathbb{RP}^2$ by an arbitrary 2-dimensional manifold."
Now, I am aware of the thread Every principal $G$-bundle over a surface is trivial if $G$ is compact and simply connected: reference? in which it is shown using quite a bit of machinery that 

If $G$ is a compact and simply connected Lie group and $\Sigma$ is a compact orientable surface, then every principal $G$-bundle over $\Sigma$ is trivial.

(Aside: It seems from the answer given that one does not need the orientability hypothesis on $\Sigma$ which is relevant to the remark in Friedrich, as $\mathbb{RP}^2$ is not orientable.)
This is shown using classifying spaces and shows directly that the bundle is trivial. But Friedrich's phrasing seems to indicate that we could show the bundle to be trivial by constructing a section of the bundle, i.e. by lifting the identity map $X\rightarrow X$ to $X\rightarrow P\rightarrow X$. Is there some (restricted) lifting criterion for principal bundles that I am unaware of in this case that produces this section? Any insight or references are appreciated.
 A: You can phrase this in the language of obstruction theory if you want, but you could also avoid the language in this specific case.
You have a 2-dimensional CW complex $X$ and a principal $G$-bundle over it. You need to demonstrate the existence of a global section. For convenience of notation, I assume there's one 0-cell and one 2-cell, but this makes no difference.
First, pick an element in the fiber above each 0-cell. Now, pick some 1-cell. The $G$-bell pulls back to a trivial bundle over the 1-cell $[0,1]$ (more precisely, consider the characteristic map $[0,1] \to X$ and pull back the $G$-bundle along this map). The bundle is trivial over $[0,1]$. Then your choice of section over the 0-cells gives you an element above 0 and 1. Now, the assumption that the group is path-connected implies you can find a section above $[0,1]$ that extends the given section. Path-connectedness is essential even if you only have one 0-cell: there is a nontrivial $\Bbb Z/2$-bundle over $S^1$.
Now do this for every 1-cell. We now want to do the same thing for each 2-cell: for each, we have a map $D^2 \to X$ that we pull back the bundle (and section) along and trivialize the bundle over $D^2$. So now we have a map from $S^1$ to $G$ and want to extend across the 2-cell. This is where we use that $G$ is simply connected! Now extend across every 2-cell as before. We have constructed a section over the whole manifold.
Last note: because a Lie group has $\pi_2(G) = 0$, you can automatically push the above argument one dimension up; every simply connected $G$ has all $G$-bundles over a 3-dimensional complex trivial.
