This issue is pretty common when you are trying to clone your GitHub repo using the SSH .i.e. - email@example.com:rahulwagh/jhooq-master.git.
There are a couple of ways to fix this issue -
- Using the HTTPS URL provided by the GitHub
By generating the SSH public keys and uploading the public SSH keys to GitHub.
Using the HTTPS URL provided by the GitHub
In this approach, we are going to use the GitHub URL which starts with HTTPS for example - https://github.com/rahulwagh/jhooq-master.git. Using the HTTPS URL you have to provide the username and password to authenticate yourself and once you are authenticated then you can easily clone the GitHub repository.
- By generating the SSH public keys and uploading the public SSH keys to GitHub
The second approach is a little long but it is the most recommended and secure way to clone your repository. For generating the SSH keys you need to use the ssh-keygen to generate your public SSH-key .i.e. - id_rsa.pub. After generating the ssh-key you need to upload the key to GitHub account SSH and GPG keys section.
Read more on troubleshooting steps - https://jhooq.com/github-permission-denied-publickey/