Just like Atiyah Lie algebroids encode the infinitesimal symmetries of principal bundles, exact Courant algebroids are believed to encode the infinitesimal symmetries of S 1 -gerbes. At the same time, transitive Courant algebroids may be viewed as the higher analogue of Atiyah Lie algebroids, and the non-commutative analogue of exact Courant algebroids. In this article, we explore what the "principal bundles" behind transitive Courant algebroids are, and they turn out to be principal 2-bundles of string groups. First, we construct the stack of principal 2-bundles of string groups with connection data. We prove a lifting theorem for the stack of string principal bundles with connections and show the multiplicity of the lifts once they exist. This is a differential geometrical refinement of what is known for string structures by Redden, Waldorf and Stolz-Teichner. We also extend the result of Bressler and Chen-Stiénon-Xu on extension obstruction involving transitive Courant algebroids to the case of transitive Courant algebroids with connections, as a lifting theorem with the description of multiplicity once liftings exist. At the end, we build a morphism between these two stacks. The morphism turns out to be neither injective nor surjective in general, which shows that the process of associating the "higher Atiyah algebroid" loses some information and at the same time, only some special transitive Courant algebroids come from string bundles.