Israel made a treaty of peace with the Gibeonites. The Israelites were God's subjects, having made a treaty with God at Mount Sinai (see study note on Exodus 20:1–23:33). Israel could not make treaties without God's approval.
made a treaty of peace with them to let them live (literally made a covenant for their lives): Nations confirmed covenants through a ceremony involving cutting animals in half as sacrifices. The parties of the covenant walked between two halves of animals to show their commitment (compare Genesis 15:9–18). If one party violated the covenant, they risked being cut in half like the sacrifice. Covenants were also written documents, sometimes carved in stone and displayed publicly for everyone to see and remember (see study note on Joshua 8:32).
In Israel, people swore oaths in the name of the Lord that bound them. violating the oath brought the Lord's judgment for false swearing (Exodus 20:7).