1

Been trying to get VS Code to remember my public key password for github so I don't have to enter it every single time I try and do a git command from the terminal. Followed multiple sets of directions and nothing works. The closest I can get is to hand type

 eval $(ssh-agent -s)
 ssh-add ~/.ssh/id_rsa

Each time I open a terminal window.

If I do that from git bash or from any terminal, the moment that terminal is closed, the setting is closed and I have to type it again. I want something that persists. I'm in Windows 10 btw. I have coworkers on the same environment and their works. I've copied their set up process step by step and it doesn't work on my laptop.

So the question is, can I run those two commands on terminal open in VS Code using the setting: terminal.integrated.shellArgs? I tried putting them in the array as two separate strings but that threw and error about being unable to open the terminal. I'm guessing they need to be formatted or have a flag or maybe run as an external script somehow. Any advice here would be awesome!

mycroft16
  • 785
  • 10
  • 28
  • 1
    I assume you saw https://stackoverflow.com/questions/45635168/vscode-how-to-run-a-command-after-each-terminal-open/60438403#60438403. Does `["eval", "$....", "ssh-add", "~/....."]` work? – Mark Aug 22 '20 at 04:06

1 Answers1

0

You can pass arguments to the shell when it is launched.

Please see the following article: https://code.visualstudio.com/docs/editor/integrated-terminal#_shell-arguments

Ousama
  • 2,176
  • 3
  • 21
  • 26