首页 > 解决方案 > 为什么每次打开新的终端窗口都必须重新输入这些命令才能让 Git 工作?

问题描述

每当我生成一个新的终端窗口时,我需要输入以下命令才能使用 git:

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

如果我没有收到此错误:

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.

我可以做些什么来确保我不必每次都输入这些命令?

标签: gitgithub

解决方案


推荐阅读