This is a useful alternative if you are not using your primary device or cannot use ssh-copy-id. Replace <username> with your GitHub or GitLab username.
curl https://github.com/<username>.keys | tee -a ~/.ssh/authorized_keyscurl https://gitlab.com/<username>.keys | tee -a ~/.ssh/authorized_keys