![]() ![]() This can cause Bash and the IDE to resolve different git.exe, as PATH is used for that (and ssh.exe and ssh-add.exe). (note that the paths starting with / are automatically prepended with the git installation folder, which by default is C:\Program Files\Git). Whenever you're in Git Bash for Windows ("Bash" from now on), the PATH is different from the global PATH, as Bash inserts some paths, in my case What we need to verify is that the git.exe used by your IDE is the same one you talk to on the terminal. I've got two more points to add that you could debug to figure out what's going on: In short, it's a mess to figure out what's going on. An update to OpenSSL (which is automatic) was also the culprit once. ![]() Some of those are fixed in the other answers.Īlso over time and various VSCode versions (or VS or GitHub Desktop or other programs using git), it has been different. There are quite a few things that can be wrong. I've had this for sooo long, and finally got to the bottom of it! My windows group policy is set to wait for the network on boot/login. I suspect the problem to be related to the delayed deployment of network drives under Windows10 (a known issue). Why is vscode not using windows native, correctly setup ssh service and instead relying on git bash ssh agent?ĭisclaimer: I spent hours reading threads about this topic and fiddling with settings. my user folder (containing /.ssh) and the working copy of the repo are located on network drivesįor me the problem boils down to one question:.I think I'm using the ssh-agent that was introduced in one of the later Windows10 updates (not sure how to check, the windows ssh-agent service is running though). ![]() Ssh-add /c/Users/username/.ssh/privatekey Manually setting up ssh in git bash and starting vscode works though: eval $(ssh-agent) ![]() The keys are tested and do work!Īfter booting, I can access my repository without problems from the windows command prompt and powershell but NOT from git bash or from vscode. SSH key(s) are located under ~\.ssh\, public key(s) are correctly setup in bitbucket/settings/security/sshkeys. I'm trying to access bitbucket via ssh from vscode but always get permission denied (publickey). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |