This is a great story of how these people were able to save themselves.
Jos 9:3 And when the inhabitants of Gibeon heard what Joshua had done unto Jericho and to Ai,
Jos 9:4 They did work wilily, and went and made as if they had been ambassadors, and took old sacks upon their asses, and wine bottles, old, and rent, and bound up;
Jos 9:5 And old shoes and clouted upon their feet, and old garments upon them; and all the bread of their provision was dry and mouldy.
Joshua 9:22 And Joshua called for them, and he spake unto them, saying, Wherefore have ye beguiled us, saying, We are very far from you; when ye dwell among us?
Read and listen to the text.