Fix fetching the list of remotes for publishing

It's not guaranteed that every git remote corresponds to a valid GitHub
project.