I'm working on a project I want to keep open source on GitHub, but I have a licensing problem. I have searched for hours, but I haven't found a license which disallows commercial use/sale of the application. This is very important as I plan to sell it.
You won't find such a license, since the freedom to use the software commercially is an integral part of the Open Source Definition, specifically see clause (6), emphasis mine:
6. No Discrimination Against Fields of Endeavor
The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.
And the non-normative rationale in the Annotated Open Source Definition:
The major intention of this clause is to prohibit license traps that prevent open source from being used commercially. We want commercial users to join our community, not feel excluded from it.
The Free Software Definition doesn't spell it out as explicitly as the OSD does, but it is implicit in the four freedoms:
- The freedom to run the program as you wish, for any purpose (freedom 0).
- The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.
- The freedom to redistribute copies so you can help your neighbor (freedom 2).
- The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.
It is however clarified explicitly in the commentary further down the page:
“Free software” does not mean “noncommercial”. A free program must be available for commercial use, commercial development, and commercial distribution. Commercial development of free software is no longer unusual; such free commercial software is very important. You may have paid money to get copies of free software, or you may have obtained copies at no charge. But regardless of how you got your copies, you always have the freedom to copy and change the software, even to sell copies.
The FSF even has an entire page about Selling Free Software.
So, in short, you haven't found such a license, because such a license cannot possibly exist.
The GNU GPL is probably the closest thing to what you are looking for.
While it expressly allows commercial use/sale the copyleft provisions are very good at deterring businesses from using it because they would have to open their source too.