The incident happened just after midnight on the night of Saturday 25 February into the early hours of Sunday 26 February.
Two men gave the victim a lift and drove him from the centre of York to Melrosegate where they dropped him off.
Detectives are asking members of the public to cast their minds back to the weekend of 25 February if they were out in York that evening, and can recall giving a lift to a man in his 20s and dropping him off in the area of Melrosegate.
If you believe it’s you that helped the man, please get in touch with North Yorkshire Police by email to DC Claire Hudson claire.hudson@northyorkshire.police.uk or by calling 101, select option 2 and ask for Claire Hudson.
If you wish to remain anonymous, you can pass information to Crimestoppers on 0800 555 111 or online at crimestoppers-uk.org
Please quote reference number 12230036065