Git is more likely to be using HTTPS for the URL of your repository by default which, explains why you are always asked for your credentials. When the legitimate SSH keys are established, it is possible to overcome this problem by simply changing the repository's URL from HTTPS to SSH.
Here’s how to change the remote url to SSH in the Git Bash:
Find out the Current Remote URL:
git remote -v
In the cases when the URLs start with https:, it points that Git is using the HTTPS and hence it will ask for credentials every time.
Change the remote url back to SSH: Change the remote url to ssh by stating the below command:
git remote set-url origin [email protected]:yourusername/yourrepository.git
Make sure to substitute yourusername and yourrepository with your actual github username and repository name.
Check the Connection To The SSH: To ensure that your SSH connection is working fine, you may use the following command:
ssh -T [email protected]
This command should respond with a message that GitHub access via SSH is possible.
Execute Push or Pull with Out Asking for Your Password Prompt: Now, please try running a git pull or git push command. Since the connection now uses SSH, it should no longer ask for your username and password.
In case the issues persist and you will also want to check that your SSH key is added correctly to your GitHub account and also it is loaded into your SSH agent. Please also tell me if you need support for those steps too.