Table of Contents
Use Git Publickey in VSCode
1. Setup Remote-ssh extension
Add remote host with githost:
Start by selecting Remote-SSH: Add New SSH Host… from the Command Palette (F1, Ctrl+Shift+P) or clicking on the Add New icon in the SSH Remote Explorer in the Activity Bar.
You'll then be asked to enter the SSH connection information. You can either enter a host name:
github.com
Or the full ssh command you would use to connect to the host from the command line:
ssh git@github.com -i ~/.ssh/id_rsa-git_at_dai
Finally, you'll be asked to pick a config file to use. You can also set the “remote.SSH.configFile” property in your User settings.json file if you want to use a different config file than those listed. The extension takes care of the rest! Use this file
C:\Users\Thuy Dang\.ssh\config
For example, entering
ssh -i ~/.ssh/id_rsa-remote-ssh yourname@remotehost.yourcompany.com
in the input box would generate this entry:
Host remotehost.yourcompany.com
User yourname
HostName another-host-fqdn-or-ip-goes-here
IdentityFile ~/.ssh/id_rsa-remote-ssh
2. Extension git graph
In its settings, set git repo search depth if your repo is inside your current working folder.