Many publishers have copyright regulations specifying which versions of a journal article can be deposited in a repository. Some permit pre-prints, others post-prints, which some allow posting of final published articles after an embargo period such as 12 months.
To check a publisher’s copyright regulations regarding archiving:
You can try negotiating with a publisher to retain more rights to your work. SPARC, the Scholarly Publishing and Academic Resources Coalition, offers resources on author rights including an addendum you can use with copyright agreements.