【问题标题】:github ssh-agent timeout mediatemplegithub ssh-agent 超时 mediatemple
【发布时间】:2016-11-16 16:35:12
【问题描述】:

我正在尝试通过 git 从 mediatemple 服务器做一些开发工作;我已经正确设置了我的 ssh 密钥,但是我的 ssh-agent 似乎有问题。从下面的提示可以看到,设置好代理后,我就可以正常连接到git服务器了。但是,大约 15 分钟后,代理超时;那时我必须再次运行它并添加我的密钥。
有谁知道如何绕过每次都需要这个?我已经尝试向 MT 开票并与他们的支持进行了交谈,但他们并没有太大帮助......

15:04:03 login: ~ $ssh -T git@github.com
Permission denied (publickey).
15:04:26 login: ~ $ssh-add -l
Could not open a connection to your authentication agent.
15:04:33 login: ~ $eval "$(ssh-agent -s)"
Agent pid 19228
15:04:39 login: ~ $ssh-add ~/.ssh/id_rsa_github
Identity added: /home/215537/users/.home/.ssh/id_rsa_github (/home/215537/users/.home/.ssh/id_rsa_github)
15:04:47 login: ~ $ssh-add -l
4096 e4:26:3e:f0:33:d3:74:4c:2c:fe:9c:d8:e8:59:9a:53 /home/215537/users/.home/.ssh/id_rsa_github (RSA)
15:04:50 login: ~ $ssh -T git@github.com
Hi ConstantinoSchillebeeckx! You've successfully authenticated, but GitHub does not provide shell access.
15:17:28 login: ~ $ssh -T git@github.com
Permission denied (publickey).
15:17:36 meepmoop.com@n10: ~ $ssh-add -l
Could not open a connection to your authentication agent.
15:20:21 meepmoop.com@n10: ~ $eval "$(ssh-agent -s)"
Agent pid 26564
15:20:27 meepmoop.com@n10: ~ $ssh-add ~/.ssh/id_rsa_github
Identity added: /home/215537/users/.home/.ssh/id_rsa_github (/home/215537/users/.home/.ssh/id_rsa_github)
15:20:33 meepmoop.com@n10: ~ $ssh -T git@github.com
Hi ConstantinoSchillebeeckx! You've successfully authenticated, but GitHub does not provide shell access.

【问题讨论】:

标签: git ssh mediatemple ssh-agent


【解决方案1】:

~/.ssh/config 中使用ssh_config

Host github.com
  IdentityFile ~/.ssh/id_rsa_github

然后你就不需要任何代理了。

【讨论】:

    猜你喜欢
    • 2021-05-28
    • 1970-01-01
    • 2012-02-02
    • 1970-01-01
    • 2023-01-13
    • 1970-01-01
    • 2014-12-17
    • 2020-05-25
    • 1970-01-01
    相关资源
    最近更新 更多