Great Dane puppy training question?

My Great Dane puppy Thor is 4 months old. Very healthy, happy and for the most part as well behaved as you can reasonably expect a baby to be.

He is growing fast and is now tall enough to stick his head in the trash can. He has started digging through the trash and tearing it up.

I try to keep an eye on him, but it is impossible to watch him every second. He is crate trained, so he does not wander around the house at night or when I am not home.

I have bought a can of stuff that is supposed to be a harmless dog repellant and sprayed it all over the outside of the trash can, including the lid. It does not seem to bother him or slow him down at all.

He is otherwise a sweet natured and well behaved puppy. I am training him to sit and stay and walk on a leash, those I can do with treats and praise. I understand how to teach what I want him to do; however I am at a loss when it comes to teaching him what I do not want him to do.

Thank you in advance for your help.