In "Folk Songs of North America," Alan Lomax suggests that Crane learned the words from John Lomax's "Cowboy Songs" (1910) and then "set his own tune." I haven't compared Crane's and Lomax's texts in many years and can't say how similar they are.