gpt4 book ai didi

github - 部署到 dokku(repo 不存在)

转载 作者:行者123 更新时间:2023-12-02 14:28:29 27 4
gpt4 key购买 nike

嗨,我一直在使用 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 key 。 (在 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 会带来这个 key (和其他 key ),我可以将其验证为我选择的名称。
SHA256:*********** NAME="Jason_Harder" SSHCOMMAND_ALLOWED_KEYS="no-agent-forwarding,no-user-rc,no-X11-forwarding,no-port-forwarding"

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

更新:

我的 Remote 最初被错误地添加为 git add remote jason@app.com 或 w.e 当它应该是 dokku@app.com 时。

最佳答案

关注 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

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

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com