A verse in Shir HaShirim says, I made you swear, O daughters of Jerusalem, by the gazelles or by the hinds of the field, that you not awaken nor arouse the love until it desires(Shir HaShirim, 2:7). The Sages explain that God administered three oaths when Israel went into exile amongst the nations: two to Israel, and one to the Gentiles. He adjured Israel not to ascend “as a wall” (some versions read, “against the wall”) and not to rebel against the nations; while He adjured the Gentiles not to overly subjugate the Jews (Ketuvot 111a). Afterwards, the Gemara adds three other oaths that Hashem administered to the Jews: “That they will not reveal the End [of Days], delay the End, or reveal the secret to the Gentiles.” Furthermore, “Rabbi Elazar says, The Holy One, Blessed Be He, said to Israel: ‘If you fulfill the oath, fine; but if not, I will allow your flesh [to be devoured] like that of the gazelles and the hinds of the field.’” (there).
One of the Rishonim, Rabbi Yitzchak De Leon, author of Megillat Esther [on the Rambam’sSefer HaMitzvot], understands the oaths to mean that “we may not rebel against the nations and conquer the Land forcibly,” and this is the intention of “not to ascend as a wall.” Based on this, he concludes that there is no mitzvah to settle the Land until Mashiach arrives (Gloss on the Ramban’s Addendum to Sefer HaMitzvot, Positive Commandment 4).
However, the greatest Rishonim and Acharonim hold that the mitzvah of Yishuv HaAretz is fixed and eternal, as the Ramban, Shulchan Aruch(Even HaEzer 75:3-5), and Pitchei Teshuvah(ibid. 75:6) determine. Thus, one should not learn from this aggadic statement that the mitzvah of Yishuv HaAretz no longer applies nowadays.
Many interpretations have been given for the three oaths. Several of them imply that we must not precipitate the End [of the exile] and ascend to the Land forcibly, without first considering the matter realistically. For there is reason to fear that, because of the hardships of exile and the protracted anticipation for redemption, people will ascend to the Land impetuously, without any practical means by which to build the Land and stand up against the nations of the world. This will lead to destruction and crisis instead of the beginning of redemption. Therefore, God made us swear that we will not attempt to return before carefully calculating our actions. Rather, we should ascend and build the Land gradually, in coordination with the nations of the world, or by way of manifest miracles, which comes to pass if we deserve the “I [God] will hasten it” form of redemption (Yeshayah, 60:22).
Indeed, the modern return to Zion occurred gradually. The Jewish community in the Land established itself step by step, while the Zionist Organization simultaneously engaged in international diplomatic efforts, until the nations recognized the Jewish people’s right to return to their Land and build there a national home. Accordingly, after the League of Nations agreed in San Remo to return the Land of Israel to the Jewish people, Rabbi Meir Simcha of Dvinsk, zt”l, wrote that “the fear of the oaths has faded away.”3.
 The [full] quote can be found in HaTekufah HaGedolah, p. 175. We will mention a few of the sources. Rashi explains [the Gemara’s statement] “They shall not go up as a wall” [to mean], “Together, with a strong hand.” The Avnei Neizer (Y.D. 453) writes that if the Jews ascend to the Land with the permission of the nations, it is not considered strong-handed. Rabbi Teichtal concurs in Eim HaBanim Semeichah, pp. 226-28 [English edition], adding that when the Jews in exile encounter great suffering, it is a heavenly sign that they must ascend to Eretz Yisrael (see the index there). Rav Tzvi Yehuda Kook explains this principle briefly in L’Netivot Yisrael, vol. 2, pp. 274-75. The entire, comprehensive work of Rabbi M. M. Kasher, HaTekufah HaGedolah, is filled with sources on the mitzvah of Yishuv HaAretz, the beginning of redemption, and explanations on the three oaths; see pp. 175-76, 273ff.
Even if someone wants to explain the oaths differently, the rule is that we do not derive halachah from aggadic statements. So writes the Avnei Neizer (Y.D. 454). Hence, the Rif, the Rosh, and all the other early commentators on Tractate Ketuvot disregard the three oaths. On the contrary, they write that there is a mitzvah to ascend to the Land. The Rambam and Shulchan Aruch, as well, leave the oaths out of their works. The author of Pinei Yehoshua (on Ketuvot 111a) points out that the Gemara in Yoma (9b) implies the opposite – that the redemption did not come because the Jews did not ascend as a wall. And since these two aggadic sources contradict each other, we must understand them in some other way, not related to halachah. According to the author of Sefer Hafla’ah (Ketuvot, ibid.), the “wall” only relates to aliyah from Babylonia. The Gra writes in his commentary to Shir HaShirim that the oaths relate to the building of the Temple, [warning us] not to burst forth and build it without Divine authorization, given through a prophet. According to Rebbe Tzaddok (Divrei Sofrim 14), even the author of Megillat Esther would agree that there is a mitzvah to settle the Land nowadays. For a comprehensive treatment of this issue, see Nachalat Ya’akov by Rabbi Ya’akov Zisberg, vol. 2, pp. 715-815.