Michael D. Coogan, The Old Testament: A Historical and Literary Introduction to the Hebrew Scriptures, third edition (OUP, 2014), 83.
Many elements of the plot of Genesis 12-50 are found in other ancient literatures. Among these, one of the most significant is the epic of Kirta (also called Keret), partially preserved on three clay tablets found at Ugarit….The first of the surviving tablets opens midstory, and the last concludes abruptly; we have no way of determining how many more tablets came at either the beginning or the end…..
The Kirta epic shares several details of plot with the ancestral narratives in Genesis. In both, we have childless ancestors; divine promise of offspring, sometimes in a dream; a journey for a wife; in the course of the journey a stop at a shrine where a vow is made; and ultimately the birth of children. While the elements of the plot found in Kirta do not occur in the same order in the ancestral narratives of Genesis, nor are all found in connection with every patriarch, a clustering of similar elements is found. It is likely that both the Canaanites of Ugarit and the ancient Israelites used a common set of motifs when telling the story of an ancestral founder, with different versions of the story varying in which motifs they included.