git always use ssh key code example
Example 1: force git to use ssh
git config --global url."[email protected]:".insteadOf "https://github.com/"
Example 2: git use ssh instead of https
git config --global url.ssh://[email protected]/.insteadOf https://github.com/