Abiola Tijani, 30, followed the victim in the early hours of 29 July before he pushed her against some railings and raped her, Sheffield Crown Court heard.
Judge Rachael Harrison said the attack was “every woman’s worst nightmare”.
Tijani, of Cherry Street in Sheffield, was sentenced on Thursday and given a lifetime restraining order to prevent him contacting the victim.
Judge Harrison said: “No sentence I pass will undo the harm you caused or be considered adequate.”
PC Sarah Frith, from South Yorkshire Police, praised the victim for her “great bravery” and “the strength of character she has shown” in helping the prosecution case.