How to push using vscode git extension

i added the public key on git and can successfully push using the ssh repo in the terminal but,
can’t push it by the vscode extension it shows this error .

git pull --tags upstream main
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

  1. How to fix this and what is the best practice to authenticate in github .

Are you saying it is working in the Visual Studio Code Terminal and not in the Extension?

Exactly , and also can you ping me some resources that have all the best practice of every tool and it updated regularly

What happens if you run a git command from the Command Palette?