0

I used git bash to clone an SSH repo (e.g. ssh://user@host:/var/www/git/www.git). When doing the clone it asked me for the password, which I entered on the command line. It managed to clone the repo.

Now every time I want to pull / push it asks me for the password. How can I automate this step?

MAX POWER
  • 5,213
  • 15
  • 89
  • 141
  • You should take a look into adding an SSH key to your github account - https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/#platform-windows – Lix Aug 22 '17 at 09:46
  • The repo isn't on Github though. – MAX POWER Aug 22 '17 at 09:49
  • 1
    Then you can configure a ssh key for your user on the host machine – Francesco Aug 22 '17 at 10:08
  • Possible duplicate of [Configuring Git over SSH to login once](https://stackoverflow.com/questions/1595848/configuring-git-over-ssh-to-login-once) – phd Aug 22 '17 at 19:27

1 Answers1

1

If you're sure you've used SSH (and not HTTPS), then you should have set a key to identify yourself, and the password you mention must be the passphrase of your key.

Then you should use a ssh-agent (or KeyChain in MacOS) to remember your password during the whole session.

Another (unsecure) way is to remove teh passphrase form your SSH key.

Patrick
  • 189
  • 1
  • 11