I have committed sodomy while the people were fasting in Ramadan. I swear by Allah that I am very regretful.
All perfect praise be to Allah, The Lord of the Worlds. I testify that none is worthy of worship except Allah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
Sodomy is one of the most grave major sins; and it is a heinous crime for which Allah destroyed those who were doing that with the most terrifying kinds of punishment, as He, The Almighty, said (what means): {And We made the highest part [of the city] its lowest and rained upon them stones of hard clay.} [Quran 15: 74]
There is absolutely no doubt that this crime is even worse during the day of Ramadan, when the sin is committed while the perpetrator is fasting. Accordingly, whoever commits such a sin has to sincerely repent to Allah, The Almighty, seek His forgiveness and offer expiation, which is freeing a slave. If one cannot afford this, then he must fast for two consecutive months. If he is unable to do any of these actions, then he must feed sixty poor persons.
Allah Knows best.
You can search for fatwa through many choices