![]() This issue is specifically for using SSH protocol. Related: that is not the correct workaround. Hence the question, why not just simply define these private key file path or SSH_ASKPASS in-built custom variables as a Json config value somewhere as a workaround, so VSCode would append these at startup to its internal environment variables? Now just restart (not reload since it has to gather the variable at launch) VSCode and it should work:įunny thing is that it even works with DISPLAY=whattheheck, so it might look for an existence of this exact variable only. ![]() Also, if you’d check these variables in GitBash you might get something like this:įor example, if you don’t want to use GitBash to start VSCode every time ( because it’s nonsense, imho), it’s possible to add these using Environment Variables window or using a command rundll32.exe sysdm.cpl,EditEnvironmentVariables (i.e. In short, it says that VSCode requires certain environment variables and GitBash is presented as an example to set these. SSH_ASKPASS=/mingw64/libexec/git-core/git-gui-askpass Just add those keys bellow to your environment: DISPLAY=needs-to-be-defined So no need to type in your password every time, no need to manually start the ssh agent, and no need to start VS Code from command line. ![]() Now the built-in OpenSSH auth agent will run on start up with your password protected key unlocked, and Git will use the Windows OpenSSH instead of it’s own. If so, you can manually run the included one to get your key added to the agent: Note: If, when installing Git for Windows, you selected the option to add bash commands to PATH, the ssh-add command might point to the wrong executable. It should automatically pick up keys stored in C:\Users\%USERNAME%\.ssh which is where ssh-keygen creates them. ![]() Add your password protected key to the agent.Open Task Manager, Services tab, click Open Services.įind OpenSSH Authentication Agent, open properties, set Startup Type to Automatic, hit OK.Īlso start the service or restart your computer. Set the ssh-agent service (not the one that comes with git) to run automatically.Git config -global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe" Make Git use the OpenSSH that comes with Windows instead of the one that comes with Git. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |