【发布时间】:2014-04-09 19:21:12
【问题描述】:
我正在尝试为 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 密钥。
- 我没有确保
git用户有shell。
【问题讨论】:
-
secure.phabricator.com/T4151 中的一些信息尚未进入主文档,但可能会有所帮助。特别是,检查您的
git用户是否具有NP(不是!!)和/etc/shadow中的/bin/sh(不是/bin/false)这样的真实shell。 -
谢谢!这应该是文档的一部分。
标签: git ssh phabricator