【问题标题】:Dokku - /home/dokku/.sshcommand: No such file or directoryDokku - /home/dokku/.sshcommand:没有这样的文件或目录
【发布时间】:2017-11-07 10:35:32
【问题描述】:

我在运行 CentOS7 的 VPS 上安装了 Dokku。当我“git push dokku master”时,我得到...

git remote set-url dokku dokku@mydomain.com:trial

git push dokku master cat: /home/dokku/.sshcommand: No such file or directory fatal: ''trial'' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

当我尝试使用 ssh 时,我也遇到了同样的错误......

ssh dokku@mydomain.com cat: /home/dokku/.sshcommand: No such file or directory Connection to mydomain.com closed.

cat /var/log/secure ... Nov 7 10:06:29 Callisto sshd[19912]: Accepted publickey for dokku from xxx.xxx.xxx.xxx port 50002 ssh2: RSA SHA256:Y0ueDcZEJWQd9H3FsetReYTDPwJPob6zm9p4Dpt4fOE Nov 7 10:06:29 Callisto sshd[19912]: pam_unix(sshd:session): session opened for user dokku by (uid=0) Nov 7 10:06:29 Callisto sshd[19914]: Received disconnect from xxx.xxx.xxx.xxx port 50002:11: disconnected by user Nov 7 10:06:29 Callisto sshd[19914]: Disconnected from xxx.xxx.xxx.xxx port 50002 Nov 7 10:06:29 Callisto sshd[19912]: pam_unix(sshd:session): session closed for user dokku

在推送之前,我正在服务器上创建应用程序...

dokku apps:create trial

要将我的公共 ssh 密钥添加到我使用的服务器 dokku ssh-keys:add dokku id_rsa.pub

查看另一个答案here 似乎我实际上在 /home/dokku/ 中缺少 .sshcommand 。关于如何解决这个问题或可能出了什么问题的任何想法?过去几天这让我发疯了。

【问题讨论】:

    标签: dokku


    【解决方案1】:

    您一定在某个时候删除了它。运行以下命令以重新设置所有内容:

    echo '/usr/bin/dokku' > /home/dokku/.sshcommand
    chmod 0644 /home/dokku/.sshcommand
    chown dokku:root /home/dokku/.sshcommand
    

    【讨论】:

    • 感谢您的帮助。我意识到我从来没有回应过。使用您的建议作为上面的指针,我查看了 dokku repo 并注意到安装后缺少一些预期的文件。似乎是由于 Docker 没有正确安装造成的。这似乎是因为我试图在 OpenVZ VPS 上运行 Docker。当我迁移到 KVM VPS 时,一切正常。
    • 你让我开心,谢谢!我在 Dokku 的初始 CentOS 服务器设置时丢失了这个文件,不知道为什么在这个操作系统上初始设置 Dokku 后它不代表。
    猜你喜欢
    • 1970-01-01
    • 2019-06-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-08
    • 2020-07-28
    • 1970-01-01
    • 2021-06-24
    相关资源
    最近更新 更多