问题描述
我正在尝试为Phabricator配置SSH以使git运行.我遵循了手册,但是当我致电echo {} | ssh git@phabricator.mydomain.com conduit conduit.ping
时,我总是得到空结果或Permission denied (publickey,keyboard-interactive).
.
I'm trying to configure SSH for Phabricator to get git running. I've followed this manual but when I call echo {} | ssh git@phabricator.mydomain.com conduit conduit.ping
I always get an empty result or Permission denied (publickey,keyboard-interactive).
.
/etc/ssh-phabricator/sshd_config
:
/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
:
/etc/passwd
:
phd:x:999:999::/var/tmp/phd:/bin/false
git:x:1005:1005::/home/git:/bin/bash
/etc/shadow
:
/etc/shadow
:
phd:!:16135::::::
git:NP:16135:0:99999:7:::
/etc/sudoers
:
/etc/sudoers
:
git ALL=(phd) SETENV: NOPASSWD: /usr/bin/git-upload-pack, /usr/bin/git-receive-pack, /bin/false
~/.ssh/config
:
~/.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
用户具有外壳程序.
- I didn't use the SSH key with the client.
- I didn't ensure that the
git
user has a shell.
推荐答案
您的ssh钩子正常运行-首先,您应确保git ssh用户能够ssh到普通的ssh守护程序-这将确保您可以用该用户登录.
Your ssh hook is working properly - first, you should ensure that the git ssh user is able to ssh to the normal ssh daemon - this will ensure that you can login with this user.
如注释中所述,您很可能有错误的主目录或错误的shell.
More than likely you have a bad home directory or bad shell as stated in the comments.
如果一切正常,请确保已将ssh密钥上载到个人资料,并且正在使用该密钥进行连接.
If all of that is working fine, make sure you have a ssh key uploaded to your profile and that you are using this key to connect with.
这篇关于使用SSH为Phabricator配置Git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!