【问题标题】:SSH agent forwarding configured and (seems to be) working but github still asks for user & passwordSSH 代理转发已配置并且(似乎)工作,但 github 仍然要求用户和密码
【发布时间】:2014-02-20 21:20:20
【问题描述】:

我按照 github 指南 (https://help.github.com/articles/using-ssh-agent-forwarding) 进行 ssh 代理转发。

$ ssh -T git@github.com
Attempt to SSH in to github
Hi username! You've successfully authenticated, but GitHub does not provide
shell access.

此命令适用于本地和服务器。但是当我在服务器上尝试 git pull (或其他与 github 相关的命令)时,它仍然会询问我的登录名和密码。

问题可能来自我在本地和服务器上没有使用相同的用户名吗?还是我错过了什么?

  • 本地:ubuntu 11.10
  • 服务器:debian 6

【问题讨论】:

  • 你的遥控器是使用git@github.com...还是https://...配置的? SSH 代理转发只影响前者。
  • 谢谢@Chris!这就是问题所在(本地为 git@github.com,服务器为 https)。你想写答案还是我应该写?
  • 我已将此添加为答案。很高兴它对你有用。

标签: git github ssh


【解决方案1】:

SSH 代理只影响使用 SSH 传输的远程。

确保您的遥控器配置为git@github.com:user/repo.git,而不是https://github.com/user/repo.git

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-02-01
    • 2018-09-22
    • 2013-08-09
    • 1970-01-01
    • 2019-12-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多