您好,我在使用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更新到我的实例并添加了此
cat ~/.ssh/id_rsa.pub| sudo sshcommand acl-add dokku Jason_Laptop
[sudo] password for jasonh:
SHA256:*******************
更新
cat〜/ .ssh / public_dokku.pub-然后将内容复制到我的dokku RSA文件中。
命令的输出是同一只猫〜/ .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
跟随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