Yoweri Museveni was careful to neither publicly support nor condemn the bill
Uganda's president has said gay people should not be killed or persecuted, as MPs continue to consider a controversial Anti-Homosexuality Bill.
In his first public comments on the bill for some time, President Yoweri Museveni also said that homosexuality should not be promoted.
The original version of the bill stipulated the death penalty for some homosexual acts but this has reportedly been dropped.
Homosexual acts are illegal in Uganda.
The BBC's Catherine Byaruhanga says the government has always stressed that the bill was introduced by an individual MP and was not official policy.
In his latest comments at the swearing in of a new head of the Anglican Church of Uganda, the president was careful to neither condemn the bill nor openly support it, our correspondent says.
The president said: "If there are some homosexuals, we shall not kill or persecute them but there should be no promotion of homosexuality.
"We cannot accept promotion of homosexuality as if it is a good thing."
Ministers have warned MPs that passing the bill would have implications for foreign relations.
It has been condemned by Western donors, who have suggested that aid could be cut if it is passed.
Speaker of parliament Rebecca Kadaga recently said the bill would be passed as a "Christmas gift" to its advocates.
However, parliament has adjourned until January without voting on it.
Even if MPs do approve the bill, Mr Museveni would have to sign it before it takes effect.
Some African opponents of homosexuality have said it was introduced to the continent by European colonisers.
However, Mr Museveni said he knew of traditional kings and chiefs who practised homosexuality, but that they did it in secret and did not promote it.
He said he had told the US ambassador to Kampala that all forms of sex were kept private in Africa, unlike in Western societies.
"I told him that I have been married to my wife for 39 years, but I have never kissed her in public and in my house before the children," the New Vision newspaper quoted him as saying at the same church ceremony.
"If I did it, I would lose elections and you know I am not about to accept that idea of losing elections."
Last month, MP Medard Segona told the BBC that the provision for the death penalty had been dropped.
In its original form, those convicted of "aggravated homosexuality", defined as when one of the participants is a minor, HIV-positive, disabled or a "serial offender", faced the death penalty.
Such offences would now be punished with life imprisonment, it is understood.
The original bill also prohibited the "promotion" of gay rights and called for the punishment of anyone who "funds or sponsors homosexuality" or "abets homosexuality".
Correspondents say many Ugandans are deeply conservative, and say homosexuality is against their religious and cultural beliefs.
Gay rights campaigners in Uganda say they are living in fear of attack.
In 2011, activist David Kato was beaten to death but police denied this was related to his sexuality.