Running VS Code 1.0.0 on Windows, trying to push to bitbucket using SSH auth.
Issue is similar to: To use <git push> on Visual Studio Code, but show "Could not read from remote repository."
However, in my case the credentials in /User/profile/.ssh
are already on my bitbucket account and if I CTRL+SHIFT+P, CTRL+SHIFT+C everything works fine in the windows cli.
Actually, it seems every other method I've tried seems to pick up those credentials such as git gui and other gui tools. VS Code seems to be the only outlier.
Which credentials is VS Code attempting to use? Is that configurable?
Edit:
Using Process Monitor to look for access to key files during fetch/pull/push
from Code only seems to show /User/profile/.ssh/id_rsa
getting looked up, which is the correct key.
I would expect VS Code to prompt for credentials after trying to use that key, but, still get Permission Denied (publickey)
Here are the things you should try:
Restart the VS code
Verify that you are using the git://
protocol
close the VS code and restart the ssh-agent:
$ eval "$(ssh-agent -s)"
Now verify that the key is actually loaded:
ssh-add -l
Generate a new pair of keys as described in the answer you attached and use them.
I would expect VS Code to prompt for credentials after trying to use that key
I you have credentials (using https for example) run this command:
git config --global credential.helper cache
// OR:
git config --global credential.helper store
cache
Cache credentials in memory for a short period of time. See git-credential-cache[1] for details.
store
Store credentials indefinitely on disk. See git-credential-store[1] for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With