我正在尝试为Phabricator配置SSH以使git运行。我跟着这manual,但当我打电话echo {} | ssh [email protected] conduit conduit.ping
我总是得到一个空的结果或Permission denied (publickey,keyboard-interactive).
。使用SSH为Phabricator配置Git
/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
UPDATE
我的问题的原因是:
- 我没有在客户端使用SSH密钥。
- 我没有确保
git
用户有一个shell。
https://secure.phabricator.com/T4151中的部分信息尚未提供给主要文档,但可能会有所帮助。特别是,检查你的'git'用户''/ etc/shadow'中是否有'NP'(而不是''')和'/ bin/sh'(而不是'/ bin/false')这样的真实shell。 –
谢谢!这应该是文档的一部分。 – witrin