These are the ideas that come to mind fro experience:
1. Make sure the cage is as safe for him as it can be. If you have an extra shy/scared chameleon, make sure the cage is very densely planted. The safer he feels (the better he can hide from you) the less vulnerable he should feel. And hopefully less defensive.
2. Don't look at him in the eyes, this can be threatening. When you go in to hand feed or do whatever to the cage, don't watch him intently, be relaxed and calm. Be patient. Animals can tell when you're tense, and it just tenses them up more.
3. Handfeed irresistible goodies! Associate yourself with yummy treats, like silk worms, butterworms, or hornworms. Whatever his favorites are. Mine go nuts for butterworms!
4. Take him out for good experiences if you feel he can handle it. If the weather permits, take him outside for some sunshine. Or let him roam a safe indoor plant for a little while. All these are good experiences for them and often work to get them warmed up to you a bit.
Some may never change, and I'm sorry that sometimes these animals are like that. They are solitary, secretive animals and aren't social by nature. We all wish they weren't but they are, and sometimes they will stay very mean forever. But you've invested so much, try working with him a few weeks and see how you feel then. Remember that he doesn't hate you, he's just really afraid of you. It's like the little toy dogs that act really aggressively, they do it because they're terrified. The hope is to change that perception of you and turn you into a good thing for him.