"And Noah built an altar" (Genesis 8:20). He built an altar and offered up burnt offerings, so that He would cut a covenant with him, that He would not again smite every living thing as He had done. And whence do we know that He swore an oath? Because He said two times, "I will not again." And so our Sages, of blessed memory, said: two times "no" (lav) or "yes" (hen) constitute an oath. And since the Holy One, blessed be He, said two times "no," they are called an oath, as it is said: "For this is as the waters of Noah unto Me: as I have sworn that the waters of Noah should no more go over the earth" (Isaiah 54:9).
Noah's Altar and the Doubled No That Became God's Oath
Midrash Aggadah, Genesis 8:20
ויבן נח מזבח. בנה מזבח והעלה עולות, כדי שיכרית ברית עמו שלא יוסיף עוד להכות את כל חי כאשר עשה, ומנין שנשבע, שאמר שני פעמים לא אוסיף, וכן אמרו חכמינו ז"ל ב' פעמים לאו או הין הם שבועה, ולפי שאמר הקב"ה שני פעמים לא, נקראו שבועה, שנאמר כי מי נח זאת לי אשר נשבעתי וגו' (ישעי' נד ט):