Reputation: 270
I have done serval times How to solve Permission denied (publickey) error when using Git?
But, every time I close git bash and reopen it. It prompts
Then I input
eval $(ssh-agent -s)
ssh-add ssh.txt
input my password
can resolve this problem. But when I reopen the git bash, I have to do everything again. How can I avoid this boring operation?
Upvotes: 1
Views: 478
Reputation: 1327144
Modify your %USERPROFILE%\.bashrc
in order to run your ssh-agent
for you: see here for an example.
That way, you won't have to repeat those commands every time you open a new bash.
See also "Auto-launching ssh-agent
on Git for Windows", from GitHub.
Upvotes: 1