4

Initial Setup

I am using Posh-Git and have followed Phil Haack's advice for using SSH. That is, I have done the following:

  1. Install msysgit.
  2. Update Posh-Git
  3. Add the ssh-agent to PATH.

Initial Test

Now, when I start Powershell, the ssh-agent does start. This is good. If I run Get-Proces I can see it:

 91       8     1728       4208   286     0.23   2520 ssh-agent

When it starts, though, it does not ask me for my username and password. This is not good.

Further, during a single PowerShell session, git repeatedly asks me for my username and password, and never remembers it.

Finding my SSH Keys

My SSH keys are located in C:\Users\<my-user>\.ssh, in which I can see two files:

github_rsa
github_rsa.pub

I have gone ahead and run ssh-add "C:\Users\<my-user>\.ssh\github_rsa".

Still the agent doesn't remember my credentials.

Testing with Git Shell

msysgit comes with the Git Shell, and when I run it, the authentication just goes right through perfectly. I am never asked for a username and password, at all.

I have looked at the answer here Configuring Git over SSH to login once, which recommends checking whether we're using https or the ssh protocol.

git config -l

In both my Git Shell and my normal Windows PowerShell prompt, the repositories are all using HTTPS.

Community
  • 1
  • 1
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467

0 Answers0