How long has this been going on?
Is your dog bothered by this (licking a lot)?
Is your dog neutered?
Some green discharge from the prepuce (the covering of the penis itself), is normal for male dogs. They produce much more when they are not neutered.
Since your dog is neutered, and is bothered by this discharge, this could mean there is an infection in the prepuce. The technical term is balanoposthitis. Generally, oral antibiotics are prescribed, like cephalexin. In some cases you will need to flush the prepuce with an antibacterial flush once or twice daily. This usually clears things up.
You will need to take your dog to the vet for an exam and to get antibiotics if they feel it is necessary.