git - 使用 SSH 为 Phabricator 配置 Git

标签 git ssh phabricator

我正在尝试为 Phabricator 配置 SSH 以运行 git。我已经关注了这个 manual但是当我调用 echo {} | ssh git@phabricator.mydomain.com conduit conduit.ping 我总是得到一个空结果或 Permission denied (publickey,keyboard-interactive).

/etc/ssh-phabricator/sshd_config:

AuthorizedKeysCommand /usr/libexec/ssh-phabricator-hook
AuthorizedKeysCommandUser git

Port 22
Protocol 2
PermitRootLogin no
AllowAgentForwarding no
AllowTcpForwarding no
PrintMotd no
PrintLastLog no
PasswordAuthentication no
AuthorizedKeysFile none

/etc/passwd:

phd:x:999:999::/var/tmp/phd:/bin/false
git:x:1005:1005::/home/git:/bin/bash

/etc/shadow:

phd:!:16135::::::
git:NP:16135:0:99999:7:::

/etc/sudoers:

git ALL=(phd) SETENV: NOPASSWD: /usr/bin/git-upload-pack, /usr/bin/git-receive-pack, /bin/false

~/.ssh/config:

Host phabricator.mydomain.com
    HostName phabricator.mydomain.com
    Port 22
    IdentityFile /c/Users/.../.ssh/id_rsa_phabricator
    PreferredAuthentications publickey
    User git

更新

我遇到问题的原因是:

  • 我没有在客户端使用 SSH key 。
  • 我没有确保 git 用户有 shell。

最佳答案

需要注意的另一件事是路径必须具有 AuthorizedKeysCommand 的正确权限,否则这也可能导致

Permission denied (publickey,keyboard-interactive)

关于git - 使用 SSH 为 Phabricator 配置 Git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22236640/

相关文章:

python - 使用 pexpect 进行 ssh 密码提示时出现 EOF 异常

java - Android JSch - 包 org.ietf.jgss 不存在

integration - 如何将 Phabricator 代码审查工具集成到 JIRA

git 命令发出远程跟踪分支的名称

c# - 从 C# 运行 Bash 命令

git - 导出整个 git 配置以与 GIT_CONFIG 一起使用

Android源码git下载错误

ssh - ssh -F配置文件和ProxyCommand

phabricator - Phabricator 中的图表

git - Phabricator:如何允许用户创建 repos?