gpt4 book ai didi

ruby-on-rails - 云 9 上的 git@github.com : Permission denied (publickey). 致命 : Could not read from remote repository.

转载 作者:行者123 更新时间:2023-12-04 18:40:01 28 4
gpt4 key购买 nike

我正在尝试使用 https://gorails.com/deploy/ubuntu/18.04 中的步骤在线部署 Rails 站点。但是当我运行 cap production deploy我收到了,请问我该怎么做才能修复它,我正在使用 aws cloud 9

deploy@93.188.163.140's password:
00:00 git: wrapper
01 mkdir -p /tmp
✔ 01 deploy@X.X.X.X 0.158s
Uploading /tmp/git-ssh-young-production-ubuntu.sh 100.0%
02 chmod 700 /tmp/git-ssh-young-production-ubuntu.sh
✔ 02 deploy@93.188.163.140 0.156s
00:00 git:check
01 git ls-remote git@github.com:oomis/young.git HEAD
01 Warning: Permanently added the RSA host key for IP address '140.82.113.4' to the list of known hosts.
01 git@github.com: Permission denied (publickey).
01 fatal: Could not read from remote repository.
01
01 Please make sure you have the correct access rights
01 and the repository exists.
#<Thread:0x0000564f38e1cb38@/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
13: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'

.```

I expect it to deploy my app, how can I fix this, please

最佳答案

这是由 ssh key 引起的。请引用这篇官方 GitHub 文档 page
关于如何生成一个,如果你还没有。如果您已经有 ssh,请从本地机器终端添加 ssh 身份,
ssh-add ~/.ssh/id_rsa
请注意,这只会为一次部署添加身份,并且每次重新启动终端或机器时都需要再次添加。我不确定您使用的是什么本地机器。此堆栈answer可能有助于如何永久添加 ssh
到您的机器。

关于ruby-on-rails - 云 9 上的 git@github.com : Permission denied (publickey). 致命 : Could not read from remote repository.,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57650727/

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