1

I'm using a git bare repository for managing dotfiles, and some other repositories for custom DWM build and all. I use SSH for pushing and pulling from git, but it keeps asking me my SSH passphrase every time try to push or pull. i have already tried

eval $(ssh-agent)

then

ssh-add ~/.ssh/id_rsa

and its added successfully, but no luck I am missing something?

1 Answers1

0

I may be mistaken but if you set a passphrase when you set up the ssh keys then you always will need to enter it. The passphrase encrypts the private key so if it is compromised it still can't be used without knowing the passphrase.

  • so there is no way, i can store this passphrase somewhere or make it remember that its me, so i don't have to enter the passphrase every time i want to push or pull. someone told me that its possible. – apoorv569 Jun 23 '20 at 16:51
  • See if your OS has or supports ssh-agent. You might be able to use that to auto enter the passphrase. – user103944 Jun 25 '20 at 11:47
  • original post already state that, I have already tried using eval $(ssh-agent) and ssh-add ~/.ssh/id_rsa – apoorv569 Jun 25 '20 at 14:17
  • When the ssh-add is done does it ask for your passphrase? – user103944 Jun 27 '20 at 11:54
  • When I ran the command ssh-add for the first time, it asked Enter passphrase for /home/apoorv/.ssh/id_rsa:, after that it said, Identity added: /home/apoorv/.ssh/id_rsa (email@email.com), then I also double checked ssh-add -l to list all added identities, and there was the one that I added. – apoorv569 Jun 27 '20 at 16:05
  • That seems like it should work. Afraid the only other way I can think of is to re-generate the ssh keys without a passphrase. – user103944 Jun 28 '20 at 21:13
  • Is there something that I need to add to ~/.ssh/config maybe? – apoorv569 Jun 28 '20 at 23:50