Last active
August 18, 2025 23:59
-
-
Save Lancear/4b884d55d62bbfb3e42b16058bb48edd to your computer and use it in GitHub Desktop.
Revisions
-
Lancear revised this gist
Apr 2, 2025 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,10 +4,10 @@ and times out with a permissions denied message. Adding the key to the SSH agent Of course it can be started in the `~/.profile` or `~/.bashrc`, but that is not helpful for the VS Code issue. To fix this we can tell git to use the OpenSSH service of Windows and add the key there, that SSH agent can be started automatically under services and will then also work with VS Code. I found this fix somewhere on the internet after some searching but unfortunately lost the post about it, thus decided to write it down myself to avoid struggling with it again in the future. > *Note: This short guide only assists in setting up the key to work nicely with VS Code on Windows.* > *For a guide on how to setup a SSH Key in general see the [Github Docs](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) or [Gitlab Docs](https://docs.gitlab.com/ee/ssh/), especially the generate and add to Github/Gitlab parts.* ## How to do it -
Lancear revised this gist
Jun 4, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ To fix this we can tell git to use the OpenSSH service of Windows and add the ke under services and will then also work with VS Code. I found this fix somewhere on the internet after some searching but lost the post about it again, thus decided to write it down myself to not struggle with it again. > *Note: This short guide only assists in setup for the key to work nicely with VS Code on Windows.* > *For a guide on how to setup a SSH Key in general see the [Github Docs](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) or [Gitlab Docs](https://docs.gitlab.com/ee/ssh/), especially the generate and add to Github/Gitlab parts.* ## How to do it -
Lancear revised this gist
Jul 4, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ about it again, thus decided to write it down myself to not struggle with it aga 2. Set the `sshCommand` for git to use Windows' OpenSSH ```shell git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe ``` 3. Inside a normal terminal, not git bash, add the key to the SSH Agent: -
Lancear revised this gist
Dec 30, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,7 @@ about it again, thus decided to write it down myself to not struggle with it aga > *Note: This short guide only assists in setup up the key to work nicely with VS Code on Windows.* > *For a guide on how to setup a SSH Key in general see the [Github Docs](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) or [Gitlab Docs](https://docs.gitlab.com/ee/ssh/), especially the generate and add to Github/Gitlab parts.* ## How to do it 1. Go to the Windows services, search for `OpenSSH Authentication Agent`, start it and set it to automatically start in the future  -
Lancear revised this gist
Dec 30, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Setup for password protected Git SSH keys for VS Code on Windows When working with password protected ssh keys for git in VS Code on Windows, VS Code by default does not ask for the password and times out with a permissions denied message. Adding the key to the SSH agent also does not work, since it needs to be started manually. Of course it can be started in the `~/.profile` or `~/.bashrc`, but that is not helpful for the VS Code issue. -
Lancear renamed this gist
Dec 30, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Lancear created this gist
Dec 30, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ # Setup for password protected Git SSH keys for Windows and VS Code When working with password protected ssh keys for git in VS Code on Windows, VS Code by default does not ask for the password and times out with a permissions denied message. Adding the key to the SSH agent also does not work, since it needs to be started manually. Of course it can be started in the `~/.profile` or `~/.bashrc`, but that is not helpful for the VS Code issue. To fix this we can tell git to use the OpenSSH service of Windows and add the key there, that SSH agent can be started automatically under services and will then also work with VS Code. I found this fix somewhere on the internet after some searching but lost the post about it again, thus decided to write it down myself to not struggle with it again. > *Note: This short guide only assists in setup up the key to work nicely with VS Code on Windows.* > *For a guide on how to setup a SSH Key in general see the [Github Docs](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) or [Gitlab Docs](https://docs.gitlab.com/ee/ssh/), especially the generate and add to Github/Gitlab parts.* 1. Go to the Windows services, search for `OpenSSH Authentication Agent`, start it and set it to automatically start in the future  2. Set the `sshCommand` for git to use Windows' OpenSSH ```shell git config sshCommand C:/Windows/System32/OpenSSH/ssh.exe ``` 3. Inside a normal terminal, not git bash, add the key to the SSH Agent: ``` ssh-add <PATH_TO_YOUR_KEY> ``` 4. It will ask for your password, enter it, and then you are all set! :raised_hands: