In Arabic tradition, according to Islamic sources, when someone makes an oath, they swear by something considered greater or more worthy than themselves. We find this in the Hebrew Bible, where the Judeo-Christian deity swears by himself, due to the lack of anyone or anything greater than, what the writers considered, the creator of the universe. We also find this in everyday life, when someone swears on their parents or children's lives, or someone swears on their respective holy books to speak the truth in a court of law.
The following are verses from the Qur'an, where we find Allah swearing oaths.
I swear by the Book that makes manifest (the truth).
Qaf. I swear by the glorious Quran (that Muhammad is the Messenger of Allah)
I swear by the wind that scatters far and wide,
I swear by the star when it goes down.
But nay! I swear by the falling of stars;
Noon. I swear by the pen and what the angels write,
Nay; I swear by the moon,
Nay! I swear by the day of resurrection.
I swear by the emissary winds, sent one after another (for men's benefit),
I swear by the angels who violently pull out the souls of the wicked,
I swear by the mansions of the stars,
I swear by the heaven and the comer by night;
Nay! I swear by this city.
I swear by the sun and its brilliance,
I swear by the night when it draws a veil,
I swear by the early hours of the day,
I swear by the fig and the olive,
I swear by the runners breathing pantingly,
From the above verses, we see that Allah does not swear by himself. Instead, Allah implies that the stars, the moon, the 'brilliance' of the sun, and a man-made city are greater than Allah - the very things he is supposed to have created. He even swears by such menial things as fruits.
The following are various ahadith on swearing oaths.
The Prophet (peace be upon him) said: Do not swear by your fathers, or by your mothers, or by rivals to Allah; and swear by Allah only, and swear by Allah only when you are speaking the truth.
Narrated Buraydah ibn al-Hasib:
The Prophet (peace be upon him) said: He who swears by Amanah (faithfulness) is not one of our number.
Narrated Abdullah ibn Umar:
Sa'id ibn Ubaydah said: Ibn Umar heard a man swearing: No, I swear by the Ka'bah. Ibn Umar said to him: I heard the Apostle of Allah (peace be upon him) say: He who swears by anyone but Allah is polytheist.
From the above, we see Muhammad warning Muslims that they are not to swear by their parents, the Ka'aba, not even by their faith, but by Allah and Allah alone.