Nairn Sharp, 28, pulled down the victim’s lower clothing during the sex attack on the 20-year-old in the Partick area of the city.
A judge told Sharp at the High Court in Edinburgh: “Standing the gravity of this matter it is clear only a significant custodial disposal is appropriate.”
Lord Arthurson noted that the first offender was 23 at the time of the crime and was assessed an posing a low risk of further sexual offending.
Sharp, formerly of Anderson Drive, Renfrew, had earlier denied assaulting and raping the woman on December 8 in 2020, but was convicted of the offence by a jury at High Court in Glasgow.
During the sex attack on the victim Sharp bit her and molested her.
Defence solicitor advocate Billy Lavelle said Sharp realised a prison sentence would be imposed on him following his conviction for rape.
He said: “He has no previous convictions. He has never been in trouble before and there are no outstanding matters.”
“He does not have a drug problem. He does not have an alcohol problem. He has led a fairly temperate life, he said.
Mr Lavelle said Sharp worked after leaving school and became a postman with the Royal Mail in Glasgow and was “an exemplary employee” but lost his job given his conviction.
The defence lawyer said: “I would submit he is a young man who is unlikely to ever be in front of a court again.”
Sharp was placed on the sex offenders’ register indefinitely following his sentencing.
Lord Arthurson made a non harassment order banning him from contacting or attempting to contact the woman for an indefinite period.