Allah (swt) opened the door of repentance, He forgives all the sins except the association with Him. If someone may ask that Allah (swt) says in another verse that He (swt) forgives all the sins without exception:
قُلْ يَا عِبَادِيَ الَّذِينَ أَسْرَفُوا عَلَىٰ أَنفُسِهِمْ لَا تَقْنَطُوا مِن رَّحْمَةِ اللَّهِ ۚ إِنَّ اللَّهَ يَغْفِرُ الذُّنُوبَ جَمِيعًا ۚ إِنَّهُ هُوَ الْغَفُورُ الرَّحِيمُ
(Say, “O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allah. Indeed, Allah forgives all sins. Indeed, it is He who is the Forgiving, the Merciful.”) (Az-Zumar: 53)
We answer that associating another God with Allah (swt) is not a sin, a sin is to commit a wrong while you know that Allah (swt) does exist, while to associate with Allah (swt) means denying His existence, so there is no contradiction between the two verses. Simply because it is not logic to forgive the sins of the one who denies the existence of Allah (swt), whereas forgiveness is for the believers who commit sins then repent.