【问题标题】:Deploying to dokku (repo does not exist)部署到 dokku(repo 不存在)
【发布时间】:2019-12-23 05:32:05
【问题描述】:

嗨,我一直在使用 dokku 时遇到问题,基本上可以归结为:

git remote add dokku jasonh@app.com:ruby-getting-started

然后我得到:

git push dokku master
jasonh@app.app.com's password:
fatal: 'ruby-getting-started' 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.

dokku ssh-keys:list - 包含我的 SSH 密钥。 (在 Dokku 创建并添加到 github)

dokku apps:create appname 

似乎创建了应用程序

    git remote -v returns dokku jasonh@app.app.com:ruby-getting-started (fetch)
dokku   jasonh@app.app.com:ruby-getting-started (push)
origin  git@github.com:myuser/ruby-getting-started.git (fetch)
origin  git@github.com:myuser/ruby-getting-started.git (push)

似乎创建了应用程序,因为它在列表中。那我错过了什么?

将 ssh 更新到我的实例中并添加了这个

cat ~/.ssh/id_rsa.pub| sudo sshcommand acl-add dokku Jason_Laptop
[sudo] password for jasonh:
SHA256:*******************

更新

cat ~/.ssh/public_dokku.pub - 然后将内容复制到我的 dokku RSA 文件中。

命令的输出是相同的 cat ~/.ssh/id_rsa.pub (除了我将我的文件命名为 dokku rsa 或其他东西)

这是我的 git remote -v

dokku   jasonh@app.app.com:sameappnameaswhatIcreated

列出 SSH 会带来这个密钥(和其他密钥),我可以将其验证为我选择的名称。

SHA256:*********** NAME="Jason_Harder" SSHCOMMAND_ALLOWED_KEYS="no-agent-forwarding,no-user-rc,no-X11-forwarding,no-port-forwarding"

我在 ~./ssh 中的配置文件,因为我的主要 ssh 用于 github。 主持人 * AddKeysToAgent 是 使用钥匙串是 身份文件 ~/.ssh/public_dokku

更新:

我的遥控器最初被不正确地添加为 git add remote jason@app.com 或 w.e 当它应该是 dokku@app.com 时。

【问题讨论】:

    标签: github ssh dokku


    【解决方案1】:

    按照dokku deployment guide,首先检查您的 ssh 连接。

    您看到jasonh@app.app.com's password: 表示SSH 在dokku 远程服务器中找不到您的公钥,并退回到帐户密码。
    将其添加为explained here。

    即:

    cd ~/.ssh
    ssh-keygen -t rsa -m PEM -P "" -f dokku
    
    # copy dokku.pub to jasonh@app.app.com:~/.ssh/authorized_keys
    # make sure it is copied as one line.
    
    # edit your local ~/.ssh/config file
    # add to it:
    
    Host dokku
      Hostname app.app.com
      User jasonh
      IdentityFile ~/.ssh/dokku
    

    检查这是否与ssh -v dokku一起工作

    然后您可以将远程 URL 更改为:

    git remote set-url dokku dokku:sameappnameaswhatIcreated
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-31
    • 1970-01-01
    • 1970-01-01
    • 2016-12-04
    相关资源
    最近更新 更多