0

Whenever I spawn a new terminal window I need to type the following commands in order to use git:

> cd ~/.ssh
> eval `ssh-agent -s`
> ssh-add git_rsa 

If I don't I get this error:

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

What can I do to make sure I don't have to keep typing those commands each time?

  • In order to "use git"? What specifically are you doing? A fetch? – Joe Phillips Jan 04 '19 at 21:55
  • 2
    What OS are you running? MacOS? A variety of Linux? The problem is that the SSH agent should already be running and should already know about keys in your .ssh folder. But the way that is configured is platform-dependent. – mkasberg Jan 04 '19 at 21:57
  • @mkasberg I'm using windows but before when using mac the same thing was needed. As for "using git" I mean cloning, pushing, etc –  Jan 04 '19 at 22:11

0 Answers0