A man who allegedly stole a taxi in San Francisco and immediately drove to the East Bay early Sunday morning was arrested when he got stuck near an off-ramp in Emeryville as he punched, kicked, and spat at California Highway Patrol officers, law enforcement officials said.