A preliminary 2.6 magnitude earthquake struck Tuesday morning near Gilroy, according to the United States Geological Survey.