Google's Ngram Viewer, which tracks words and phrases used in printed materials, has it appearing around 1825. Without the "Ye" it appears around 1817. So look for some early-19th-century humorist as its originator. It has that kind of thumbs-in-the-braces, rocking-on-the-toes clubbable feel about it.