Retrieve the repositories from the database