Hadithcore
Mishkat al-Masabih, 3110

Buraida reported God's Messenger as saying to ‘Ali, “Do not give a second look, ‘Ali, for while you are not to blame for the first you have no right to the second.” Ahmad, Tirmidhi, Abu Dawud and Darimi transmitted it.

وَعَنْ بُرَيْدَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ لِعَلِيٍّ: «يَا عَلِيُّ لَا تُتْبِعِ النَّظْرَةَ النَّظْرَةَ فَإِنَّ لَكَ الْأُولَى وَلَيْسَتْ لَكَ الْآخِرَةُ» . رَوَاهُ أَحْمَدُ وَالتِّرْمِذِيُّ وَأَبُو دَاوُدَ والدارمي

References1 variant
In-Book Reference
Book 13, Hadith 31