Published in his "The Songs of Scotland, Ancient and Modern" (4 vol., 1825). Allan Cunningham was the arch-forger of Scottish songs and most of the "ancient" ones in this book were written by him as well as some that he acknowledged. He was quite a good lyrical poet, and this is one of his best. It did not originally have a tune.:-)
Ian