You could use a mild liquid dish soap. It won't take much soap, just a small squirt per gallon of warm water. For a better cleaning before painting you can use TSP (trisodium phosphate). Use minimal mixing requirements for most cleaning jobs.
For both cases make sure to rinse well with clean water an let dry before painting.