[英]unable to git clone a diffusion repository over ssh
i have setup a phabricator instance with git repository hosting using diffusion in my cloud ubuntu server by following the steps mentioned in both https://secure.phabricator.com/book/phabricator/article/diffusion_hosting/ and https://gist.github.com/sparrc/b4eff48a3e7af8411fc1 我已经按照https://secure.phabricator.com/book/phabricator/article/diffusion_hosting/和https://gist.github中提到的步骤在我的云ubuntu服务器中使用扩散设置了一个带有git存储库托管的phabricator实例的.com / sparrc / b4eff48a3e7af8411fc1
i am able to see the repositories in the diffusion part of my phabricator website. 我能够在phabricator网站的扩散部分看到这些存储库。 i am also able to see the clone ssh URL, but when i try to actually clone the repo from my client, i see the following: 我也能看到克隆ssh URL,但是当我尝试从我的客户端实际克隆repo时,我看到以下内容:
$ git clone ssh://ph-git@pm.example.com:2222/diffusion/GPSCLJ/gps_v1.git gps
Cloning into 'gps'...
Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
i have uploaded my public key to my phabricator account 我已将我的公钥上传到我的phabricator帐户
i have other doubts as mentioned in https://gist.github.com/sparrc/b4eff48a3e7af8411fc1#gistcomment-1847168 about the setup in general. 我有其他疑问,如https://gist.github.com/sparrc/b4eff48a3e7af8411fc1#gistcomment-1847168中提到的一般设置。 /* not replicating the doubts here, because the context for the doubts is in the github gist */ / *没有复制这里的疑虑,因为怀疑的背景是在github gist * /
============================== ==============================
hey @CEPA thanks for the reply (editing here, because i couldn't format my points if i replied to your comment) 嘿@CEPA感谢您的回复(在此编辑,因为如果我回复您的评论,我无法格式化我的观点)
From the GitHub thread : 从GitHub线程 :
furthermore, I have added public-key on the site for my user, but when doing ssh we use the "
git
" user. 此外,我在网站上为我的用户添加了公钥,但在做ssh时我们使用“git
”用户。 how does this tie up? 这怎么样?
It should not "tie up". 它不应该“束缚”。 ssh is looking for your public key in ~/.ssh/authorized-keys
. ssh正在~/.ssh/authorized-keys
查找你~/.ssh/authorized-keys
。 If ~
represents a home's account which never included your public key, you will not have the right to ssh to the remote machine with that account. 如果~
表示从未包含您的公钥的家庭帐户,您将无权使用该帐户ssh到远程计算机。
Does your clone URL really have the port on there? 你的克隆URL真的有那个端口吗?
Usually when I see clone URLs from Phabricator, they are using the default SSH port (22) and therefore don't need to be be in the clone URL. 通常当我看到来自Phabricator的克隆URL时,它们使用默认的SSH端口(22),因此不需要在克隆URL中。 This means that SSHD is usually setup to watch a different port (like 2222) so when you try to connect to your Phabricator server you would need to specify the port. 这意味着SSHD通常设置为观察不同的端口(如2222),因此当您尝试连接到Phabricator服务器时,您需要指定端口。
You may have set this up differently, but that is how we did it with ours (SSHD -> 2222 and Git -> 22). 你可能会以不同的方式设置它,但这就是我们用它们做的(SSHD - > 2222和Git - > 22)。 I hope this helps. 我希望这有帮助。
For our diffusion.ssh-port
we have it set to empty (defaults to 22). 对于我们的diffusion.ssh-port
我们将它设置为空(默认为22)。 You can set this by going to your Phabricator instance and going to: <Base_URL>/config/edit/diffusion.ssh-port/
您可以通过转到Phabricator实例进行设置,然后转到: <Base_URL>/config/edit/diffusion.ssh-port/
For the SSHD setup, we edited /etc/ssh/sshd_config
to change port 22
to port 2222
. 对于SSHD设置,我们编辑了/etc/ssh/sshd_config
以将port 22
更改为port 2222
。
It has been a long time since I set this up. 我设置它已经很长时间了。 As far as I remember, we followed these directions 据我记忆,我们遵循了这些指示
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.