嗨,我遇到了dokku的麻烦,基本上可以归结为:

git remote add dokku [email protected]:ruby-getting-started

然后我得到:
git push dokku master
[email protected]'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 [email protected]:ruby-getting-started (fetch)
dokku   [email protected]:ruby-getting-started (push)
origin  [email protected]:myuser/ruby-getting-started.git (fetch)
origin  [email protected]:myuser/ruby-getting-started.git (push)

自从列表中出现以来,似乎要创建该应用。那我想念什么呢?

更新ssh'd到我的实例并添加了这个
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   [email protected]: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是
UseKeychain是
IdentityFile〜/ .ssh / public_dokku

更新:

我的 Remote 最初被错误地添加为git add remote [email protected],或者本来应该是[email protected]

最佳答案

dokku deployment guide之后,首先检查您的ssh连接。

您看到[email protected]'s password:的事实意味着SSH在dokku远程服务器中找不到您的公钥,并退回到了帐户密码。
将其添加为explained here

那是:

cd ~/.ssh
ssh-keygen -t rsa -m PEM -P "" -f dokku

# copy dokku.pub to [email protected]:~/.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

关于github - 部署到dokku(不存在仓库),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/59450552/

10-13 07:44