git - ssh-agent 的问题:在 Windows 10 上关闭 git 终端后 ssh-agent 不起作用
问题描述
按照bitbucket上的教程,我已经配置了 ssh-agent 并将我的私钥保存在 Windows 10 上的 ssh-agent 中。
To start the agent, run the following:
$ eval $(ssh-agent)
Agent pid 9700
Enter ssh-add followed by the path to the private key file:
$ ssh-add ~/.ssh/<private_key_file>
但是在关闭 git 终端并重新打开它之后,发生了奇怪的事情。
$ ssh-add -l
The agent has no identities.
顺便说一句,在这种情况下,它仍然需要输入私钥的密码。
有人可以告诉我发生了什么以及如何解决这个问题。
解决方案
关闭终端可能会关闭 ssh-agent。
您应该遵循“ Auto-launching ssh-agent on Git for Windows ”以确保在重新打开git bash
会话时.bashrc
自动重新启动 ssh-agent。
推荐阅读
- jenkins - Jenkins 的 HELM 安装无法连接到集群
- asp.net-core - 我的csHtml中没有出现字体真棒图标
- input - Android 10 adb shell输入keyevent返回0
- laravel - 如何通过 laravel 应用程序使用数字海洋服务器从另一台服务器在远程服务器上运行脚本文件
- c# - How can I have custom asserts with Shouldly and maintain the call-site-specific assertion messages?
- react-native - React Navigation - 从其他选项卡屏幕打开抽屉
- python - 在我的 kivymd 文件中显示 MDList 不起作用
- ruby-on-rails-6 - 我是否需要继续构建我的模型,直到控制器和视图或创建另一个模型来创建每个模型的关联?
- php - 将文件存储在 s3 存储桶中 Laravel
- mysql - 如何将“UPPER”应用于 Eloquent 查询?