Hello everyone. I’m in the process of setting up my Github remote repositories and I have troubles with setting SSH connection to my IDE. I’m using VSCodium (VSCode fork with removed telemetry). I want to use SSH to both authenticate and sign commits.
I’m following official Github docs how to set everything up, and I have created key pair and successfully uploaded it to Github. Everything was easy until it came to setting up SSH connection in VSCodium which does not recognize key passphrase.
I’m running Linux and I have ssh-agent running in the background. At the same time I found that I have no ~/.ssh/config file present.
my@os:~$ ssh-add -D
All identities removed.
my@os:~$ ssh-add -l
The agent has no identities.
What should the ssh configuration look like to make the IDE connection work?
I haven’t used vsc*de for this type of thing but the ~/.ssh/config below may work (after starting & authenticating your ssh-agent ofc). It’s also possible you need to start the ssh-agent when your desktop starts so it is visible to vsc*de. Optionally you could start it from the terminal where you have authenticated your private key with ssh-add.
Host github.com
HostName github.com
User git
Thanks for the info and the snippet.
Just to confirm the code should look exactly like you provided it, or should I replace github.com and git with my repo address and my username?
All references to github repositories should have git as the user unless using HTTPS (in that case it’s no longer SSH). Though vsc*de should use the URI from git remote -v.

If you have started the ssh-agent and can git pull w/o issue but, vsc*de is not picking it up, try starting vsc*de from the terminal where you are able to git pull.
If it works then you know that the ssh-agent is not available to your desktop session. It depends on what kind of desktop you are using as to the best way to make the agent available in that case.
Ok. I was able to find a reason why this wouldn’t work. I needed to add AddKeysToAgent yes to my ssh config file. Without this ssh-agent couldn’t store my key. With this I’m able to pull and push properly.
On the negative side VSCodium apparently cannot use SSH keys to sign commits, only GPG.
1 Like