Powershell Git automate passphrase

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of michalis anto michalis anto 8 months ago.

  • Author
    Posts
  • #36736
    Profile photo of michalis anto
    michalis anto
    Participant

    Hello folks, recently installed Git on windows 10 under powershell 5, however, for some reason I cannot avoid entering passphrase each time I perform a push.
    I have performed the below obvious steps:
    1. Posh-git is installed (version 0.6.0.20160310)
    2. ssh-agent is running
    3. and I have added my sshkey (add-sshkey)

    Note: If use the start-ssh-agent.cmd which is under git directory I don't need to enter a passphrase.

    any advise is more than welcome

  • #36988
    Profile photo of Mike F Robbins
    Mike F Robbins
    Participant

    I recently wrote a blog article about this and although I'm using HTTPS instead of SSH, I believe the solution to the problem you're experiencing will be the same. Enabling the Git wincred credential helper should prevent having to enter credentials each time:

    git config --global credential.helper wincred

    If you're interested in the blog article that I referenced, you can find it here: Configuring the PowerShell ISE for use with Git and GitHub"

  • #37177
    Profile photo of michalis anto
    michalis anto
    Participant

    thanks for your answer Mike. Indeed the https way is more convenient for windows systems as you aptly mentioned in your blog article

You must be logged in to reply to this topic.