A common cause is cloning using the default (HTTPS) instead of SSH. You can correct this by going to your repository, clicking “Clone or download”, then clicking the “Use SSH” button above the URL field and updating the URL of your origin remote like this
git remote set-url origin git@github.com:username/repo.git
Reference : https://help.github.com/en/github/using-git/changing-a-remotes-url#switching-remote-urls-from-https-to-ssh