If you just added a SSH key into a repository Deploy keys section, this command might be useful for you to test and verify if the SSH connection works between your machine and GitHub server.
$ ssh -i /path/to/ssh/private-key -T git@github.com
For example:
$ ssh -i /home/zulh/.ssh/my-id_rsa -T git@github.com
Warning: Permanently added the RSA host key for IP address 'x.x.x.x' to the list of known hosts.
Hi zulh/awesome-repo! You've successfully authenticated, but GitHub does not provide shell access.
References: