Skip to content

Git: Support git with private key password #13680

Closed

Description

@lw-schick
  • VSCode Version: 1.6.0
  • Commit e52fb0b
  • Date 2016-10-10T18:37:40.189Z
  • Shell 1.3.7
  • Renderer 52.0.2743.82
  • Node 6.5.0
  • OS Version: Windows 7 Pro

Steps to Reproduce:

  1. Create a public-private key pair with password protection
  2. add them to your github account
  3. setup git to use the private key file
  4. try to push something with git

Result:

git pull
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Activity

  1. joaomoreno commented on Oct 14, 2016

    @joaomoreno
    Contributor

    Does it work from the command line? How exactly do you setup git to use the private key file?

  2. added
    info-needed
    on Oct 14, 2016
  3. lw-schick commented on Oct 14, 2016

    @lw-schick
    Author

    It works from the command line. Actually I setup git via tortoise git - so I guess all is properly done.

  4. lw-schick commented on Oct 14, 2016

    @lw-schick
    Author

    image

  5. joaomoreno commented on Oct 14, 2016

    @joaomoreno
    Contributor

    How do you launch the command line? Which command line?

  6. lw-schick commented on Oct 14, 2016

    @lw-schick
    Author

    I use git bash (MINGW64) on windows.

  7. joaomoreno commented on Oct 14, 2016

    @joaomoreno
    Contributor

    Right. So, we might have to add a git.sshkey setting too, like Tortoise.

  8. added
    bug
    git
    and removed
    info-needed
    on Oct 14, 2016
  9. added
    help wanted
    on Oct 26, 2016
  10. 315 remaining items

  11. albertosantini commented on Aug 2, 2022

    @albertosantini

    The trick is using SSH-Agent, builtin in Windows, even if I installed Git Bash in Windows.

    1. SSH-Agent:

    image

    1. Environement variable GIT_SSH:

    image

    1. I added my keys, protected with a passphrase, using the usual ssh-add from a CMD prompt (don't use Git Bash shell).

    Done.

  12. 4c74356b41 commented on Aug 16, 2022

    @4c74356b41

    yo, 6 years later and yet here we are. this should be fixed without ssh-agent. i dont use ssh-agent and i'm happy to input my passphrase everytime (just like i do in the console)

  13. BitBuf commented on Aug 22, 2022

    @BitBuf

    I genuinely can't believe this hasn't been fixed yet. git.sshkey setting, we need it!

  14. serious-angel commented on Aug 22, 2022

    @serious-angel

    I genuinely can't believe this hasn't been fixed yet. git.sshkey setting, we need it!

    My apologies, but have you considered submitting a pull request with a possible solution, yet?

  15. dominikseger commented on Aug 23, 2022

    @dominikseger

    Just Microsoft things ...

  16. lszomoru commented on Sep 22, 2022

    @lszomoru
    Member

    I wanted to follow up on this issue and you provide you an update regarding some of the improvements that we have made recently when it comes to better support of SSH keys that use a passphrase.

    Before using VS Code, please ensure that you are able to successfully use the SSH key that uses a passphrase from your terminal for various git operations (ex: clone, pull, push). You can use the following steps to test you SSH key, and to troubleshoot any potential problems.

    The latest Insiders release of VS Code contains improvements to detect that the SSH key uses a passphrase and displays a quick input widget at the top of the window so that users can enter the passphrase for the SSH key. The passphrase has to be entered every time the SSH key is used for a git operation. You can also configure the authentication agent on your machine using these steps so that you do not have to enter the passphrase every time the SSH key is used.

    Please download the latest Insiders release, try out these improvements and let me know if you run into any issues.

    ⚠️ Please note that we do not yet support SSH keys that use a passphrase and a hardware security key.

  17. lszomoru commented on Sep 26, 2022

    @lszomoru
    Member

    I have file a new issue to track the pending work to support SSH keys with a hardware key. I will go ahead and mark this issue as closed so that it gets covered in the current endgame in preparation for the upcoming Stable release. If you run into any issues please file a separate issue. Thank you!

  18. scruel commented on Oct 9, 2022

    @scruel

    Ladislau Szomoru (@lszomoru) Thanks for your work, just keep waiting for this feature until now!

  19. ZeWaka commented on Oct 9, 2022

    @ZeWaka

    Thanks so much for this!

  20. locked and limited conversation to collaborators on Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestgithelp wantedon-testplan

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions