Egg eating snakes do take gecko eggs as babies, in fact I started mine off on the eggs of Moorish geckos (
Tarentola mauritanica) and Annulated geckos (
T. annularis) as it was too small even for finch eggs. Several African herpetologists I have spoken to have voiced the suspicion that newly hatched egg eaters do indeed start out on gecko eggs before graduating on to bird eggs. Mine (an Egyptian egg eater,
Dasypeltis bazi) took to them readily when I first got it.
However... they gecko eggs will
not be suitable as prey for very long - you will eventually need to graduate them up to finch and pigeon eggs, and then quail eggs. You would not be able to keep an adult egg eater going on gecko eggs. That is assuming you get hold of a captive bred baby, which are sometimes available and historically have been regarded as very difficult to feed conventionally (most resort to tube feeding them).
Also... they cannot just be store bought eggs; they need to be fertilised or 'hatching' eggs. You can order hatching eggs off ebay for all sorts of birds but it is usually a lot cheaper to find a local breeder and source them from there; often you can get finch or canary eggs which are ideal for small egg eaters.
Another thing you need to consider is that egg eaters do not eat all the time, they can go a period of months without food and then glut on a whole nest of eggs. Overfeeding these guys is bad.
I generally wait 2-3 months between feeds for my adult
Dasypeltis bazi and then offer it six eggs, or as many as it will take in one feed (usually it takes 3 or 4 and stops). The snake will usually let you know when it is hungry as it will start wandering the enclosure ceaselessly for a few days.
Another important note - which species of egg eater you find will greatly affect how you keep it and how hardy it will be.
D. scabra and
D. bazi are very hardy if you can keep them fed.
D. gansi,
D. medici and
D. atra can be variable as different populations can come from different habitats (some can be quite montane!) which means it is important to know accurate locality data so you can provide them the correct care.
Here are some images of my
D. bazi, I received it as a stowaway in 2015 along with a group of whip snakes as a tiny animal, it is now at full size.