Suppose one of my papers is published by journal A and I upload it in addition to my university repository B. When people cite this paper, would some cite the paper in A and some the one in B? Or is it ensured somehow that people will only cite the one in the journal?
If it's a direct copy of the published version (same PDF, with formatting, headers etc.) I'd be very surprised if anyone would fail to cite the journal version. I mean, what's next? Providing the address to their university library instead of using a standard citation format for a printed publication?
If it isn't a direct copy, but the copy in university repository B lists the journal reference, readers will generally cite the journal version. This also tends to happen with papers on preprint repositories such as arXiv, except when people find the preprint version before it's published, and don't remember to check their bibliography for updates before they submit/publish their own work. If no journal reference is listed, you can't really blame the readers for not noticing the version in A, so make it easy for them to get it right.
Now, this isn't really enforced. The closest thing I've encountered is that many journals will ask authors to double check references that don't look like peer reviewed and published versions during the copy-edit phase. As you say, this could be considered a disadvantage to green OA, but it's likely outweighed by the visibility advantage of having a non-paywalled version.
In addition to Anyon's answer: Some journals might have specific rules about copies of papers on university repositories and preprint servers. E.g. Molecular Ecology Resources state in their editorial policies:
Given that the measurable impact of the article is diminished when citations are split between the preprint and the published article, authors are required to:
- update the entry on the preprint server so that it links to and cites the DOI for the published version
- cite only the published article themselves.