-3

I have set up git shell

When I push the change to the remote server which is user@192.168.0.24 it asks for a password of that user.

I want to avoid entering the password every time I do git push origin master or git pull.

I have generated a key on putty for the user@192.168.0.24

How can I do store the password or use ssh keys?

Michael
  • 9,794
  • 1
  • 32
  • 49
user3302688
  • 27
  • 1
  • 6

3 Answers3

0

You have 2 cases:

  1. Remove passphrase from your key (by default - id_rsa). If you use putty - do this using puttygen. If u use pure msysgit do the command:

    $ ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]
    
  2. Use pageant from putty package to store your passphrase. It would ask passphrase only once for Windows user login session.

radistao
  • 13,883
  • 10
  • 58
  • 87
0

You want to tell the server about the preshared key (https://help.github.com/articles/generating-ssh-keys) or put the user's password in .netrc (Git - How to use .netrc file on windows to save user and password).

Community
  • 1
  • 1
robrich
  • 12,789
  • 6
  • 33
  • 59
0

First ensure, you can ssh to the server without a password:

ssh 192.168.0.24

If this asks you for a password, you need to add your public key to the server in .ssh/authorized_keys Then ensure you can ssh again without a password.

Then use ssh protocol to clone/pull/push your git repo: git clone user@192.168.0.24:repo.git

Michael
  • 9,794
  • 1
  • 32
  • 49