I have had some success with an electric fence, very basic set-up:
- put weed barrier down (optional, but makes it much easier to avoid weeds to touch the line and short it)
- put plastic stakes down at 5 foot increments, for example these:
https://www.amazon.com/dp/B0B7BQKP89?ref=ppx_yo2ov_dt_b_product_details&th=1 (but anything you have that is insulated works)
- attache metal wire stake to stake.
- attach wire to electric fencer, I am using this solar one:
https://www.amazon.com/gp/product/B000BWZB74/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1
One thing to think about is that the squirrel needs to be making contact with the ground and the wire at the same time. If you use the electric wire above wood chips, the wood chips may insulate the squirrel from the ground and the squirrel won't get shocked. A solution would be to place a small strip of chicken wire below the wires and ground that chicken wire.
You probably don't have to fence off the whole garden, just the side(s) the squirrels are coming from
Good luck
M