Awwwe, that's kinda cute. Gunther is the same way with new people. They will go to pet him and he'll duck and move away. If he's on leash, I'll hold him in front and have them pet his back, then work their way up to his head........he's more comfortable that way, but it's been something we've been working on for years.
But if he's off leash, it does take some time to warm up. He's much better than he used to be and now it really only takes him a few minutes. If I'm talking to them he warms up even faster. But it is pretty rare for him to take treats from other people, even if he knows them.