部署到dokku(存储库不存在) [英] Deploying to dokku (repo does not exist)

查看:67
本文介绍了部署到dokku(存储库不存在)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用dokku时遇到麻烦,基本上可以归结为:

Hi I've been having trouble with dokku and basically it boils down to this:

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 ssh-keys:list - had my SSH key included. (created in Dokku and added to 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)

似乎在列表中创建了该应用.那我想念什么?

Seemed to create the app since its in the list. so what am i missing?

将ssh'd更新到我的实例并添加了

update ssh'd into my instance and added this

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/public_dokku.pub - then copied the contents to my dokku RSA file.

该命令的输出与cat〜/.ssh/id_rsa.pub相同(除非我将我的文件命名为dokku rsa或其他名称)

output of the command is the same cat ~/.ssh/id_rsa.pub (cept i named my file dokku rsa or something)

这是我的git remote -v

Here is my git remote -v

dokku   jasonh@app.app.com:sameappnameaswhatIcreated

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

Listing SSH brings this key (and others) which i can verify as the name i picked.

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

My config file in ~./ssh since my main ssh is for github. Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/public_dokku

更新:

我的遥控器最初不正确地添加为git add remote jason@app.com,或者当它本来应该是dokku@app.com时添加的.

My remote was improperly added originally as git add remote jason@app.com or w.e when it should have been dokku@app.com.

推荐答案

遵循dokku部署指南,请首先检查您的ssh连接.

Following the dokku deployment guide, check first your ssh connection.

您看到 jasonh@app.app.com的密码:的事实意味着SSH在dokku远程服务器中找不到您的公钥,并退回到了帐户密码.
将其添加为在这里解释.

The fact you see jasonh@app.app.com's password: means SSH does not find your public key in dokku remote server, and falls back to the account password.
Add it, as 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更改为:

You can then change your remote URL to:

git remote set-url dokku dokku:sameappnameaswhatIcreated

这篇关于部署到dokku(存储库不存在)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆