Administrator
Administrator

Reputation: 270

Every time reopen git bash: [email protected]: Permission denied (publickey)

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 enter image description here 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

Answers (1)

VonC
VonC

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

Related Questions