1

I can connect to the Git server and do anything I want from the VSCode build in terminal, but, as soon as I use the command pallette and want to perform a push, it fails as now passphrase prompt is shown.

Is there any way to avoid entering the passphrase at each push?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
skyfreak42
  • 55
  • 1
  • 8

3 Answers3

3

That seems expected considering the Remote Development Tips and Tricks section:

Enabling alternate SSH authentication methods#

If you are connecting to an SSH remote host and are either:

  • Connecting with two-factor authentication
  • Using password authentication
  • Using an SSH key with a passphrase when the SSH Agent is not running or accessible

then VS Code should automatically prompt you to enter needed information. I

So make sure the SSH agent is running locally

VS Code will automatically add your key to the agent so you don't have to enter your passphrase every time you open a remote VS Code window.

To verify that the agent is running and is reachable from VS Code's environment, run ssh-add -l in the terminal of a local VS Code window.
You should see a listing of the keys in the agent (or a message that it has no keys).
If the agent is not running, follow these instructions to start it. After starting the agent, be sure to restart VS Code.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

Automatically load keys into the ssh-agent and store passphrases in the keychain: (see step 2)

If you're using macOS Sierra 10.12.2 or later, you will need to modify your ~/.ssh/config file to automatically load keys into the ssh-agent and store passphrases in your keychain.

First, check to see if your ~/.ssh/config file exists in the default location.

$ open ~/.ssh/config
> The file /Users/YOU/.ssh/config does not exist.

If the file doesn't exist, create the file.

$ touch ~/.ssh/config

Open your ~/.ssh/config file, then modify the file to contain the following lines. If your SSH key file has a different name or path than the example code, modify the filename or path to match your current setup.

Host *.github.com
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519
Bjørnar Hvidsten
  • 859
  • 12
  • 15
-1

to make it work I had to ad the key to OSX keychain and configure it in .ssh/config

skyfreak42
  • 55
  • 1
  • 8