5

I started using SSH based authentication to push/pull to/from my github remotes.

For any git related work, I used the default terminal present in Ubuntu.

The problem started when I switched to Visual Studio Code a few weeks ago. VSCode has some git features, and this results in a prompt every few minutes.

Unlock Private SSH Key

This prompt is displayed/drawn over any window. The keyboard cursor changes focus from the current working window to this prompt window. The problem further exacerbates if you are using multiple monitors.

My main questions are -

  1. Why does this happen?
  2. What kind of access am i providing to Visual Studio Code?
  3. Will the key be decrypted and VSCode will have access to my private SSH key forever?

My efforts

I hadn't set up the ssh-agent till now. So, i followed these steps here to add my private key to the ssh-agent. I thought that once I set ssh-agent up and VSCode needed access to my private key, the ssh-agent would handle it instead.

But that didn't stop the prompts either, which makes me think that VSCode needs direct access to my decrypted private SSH keys.

At this point, the prompts were coming up every few minutes and disturbing my workflow and I found [this answer][3] which showed me the way to make VSCode stop fetching any git realted changes automatically.

And this is where things stand as of now.

I really think that VSCode is a good editor. Much better than Atom. And I really want to use its inbuilt git functions but I won't allow it access to my private SSH keys.

I went have visited almost all the community resources of VSCode listed on https://code.visualstudio.com/community but I couldn't get a good answer on this.

I am running Ubuntu 16.04.2 with git version 2.7.4

Ativerc
  • 93
  • 1
  • 7
  • Your post misses the links 3, 4, 5 and 6 – Vampire Jun 12 '17 at 12:54
  • @Vampire I think it's the 2 link limit for new users. – oxalorg Jun 12 '17 at 13:10
  • Ah, ok, didn't know this limit. But still they are missing. :-) He can add them as comments, then we can add them to the post. :-) – Vampire Jun 12 '17 at 13:12
  • Yeah, I left the missing links in by choice. Link 3 is https://stackoverflow.com/a/34627954/5405016 Links 4,5,6 are kinda pedantic. Better to Link this directly https://code.visualstudio.com/community And the tag for SO questions on VSCode is https://stackoverflow.com/questions/tagged/vscode – Ativerc Jun 12 '17 at 14:06
  • That's pretty cool. I did not know VS ran on Linux and Mac. – jww Jun 12 '17 at 19:11

1 Answers1

5

Why does this happen?

It is a gnome-keyring, not the ssh-agent.

What kind of access am i providing to Visual Studio Code?

It is only allowed to access the remote server (github) using your credentials (probably you configured it to do so).

Will the key be decrypted and VSCode will have access to my private SSH key forever?

No. The key is decrypted but NEVER available to calling application (in this case VSCode). The code is decrypted inside of gnome-keyring and the application has only access to request signatures using this key.

Jakuje
  • 24,773
  • 12
  • 69
  • 75