git - 为什么每次打开新的终端窗口都必须重新输入这些命令才能让 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.
我可以做些什么来确保我不必每次都输入这些命令?
解决方案
推荐阅读
- jenkins-pipeline - 如何在jenkinsfile中创建循环
- jenkins - How to unset environment variable in Jenkins
- python - 需要帮助将一副牌存储在一个列表中并给它们各自的整数值吗?
- docker - 如何检查docker容器内的堆大小
- python-3.x - 在一张图中绘制两条线,每条线都有自己的 y 值
- scala - 如何在同一台机器上设置不同的 Scala 版本?
- postgresql - PostgreSQL - 为数据库模式生成 CREATE 脚本:过程、触发器、序列
- angular - 如何访问 mat-table 的 TR 中的 MatTableDataSource 元素?
- ios - iOS:在 SwiftUI 列表中显示 IBeacon 信息给出错误“'NSObject' 类型的值没有成员”
- php - 根据购物车总 woocommerce 在结帐页面上显示 html