未找到将 Rails 应用部署到数字海洋 dokku ssh 密钥

编程入门 行业动态 更新时间:2024-10-15 12:36:17
本文介绍了未找到将 Rails 应用部署到数字海洋 dokku ssh 密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想将 rails 应用程序部署到数字海洋.我使用这个turorial:blog.flatironschool/using-digital-ocean-and-dokku-for-easier-rails-app-deploys/

I want to deploy rails app to digital ocean. I use this turorial: blog.flatironschool/using-digital-ocean-and-dokku-for-easier-rails-app-deploys/

当我这样做时:

首先,您需要复制计算机的公共 SSH 密钥.转到您的终端并运行:$ cat/.ssh/idrsa.pub

First, you’ll need to copy your computer’s public SSH key. Go to your terminal and run this: $ cat /.ssh/idrsa.pub

我得到以下输出:

jonstark@jonstark-pc:~$ cat /.ssh/idrsa.pub cat: /.ssh/idrsa.pub: No such file or directory

我的下一步行动是什么?(我真的是 ubuntu 的新手).我知道可能我应该在另一个地方问这个问题.所以如果感觉如此,请告诉我在哪里.

What are my next actions? (I am really newbie to ubuntu). I understand that may be I should ask this question in another place. So if it so feel to tell me where.

好的.谷歌搜索后我做了一些事情.这是我所做的:

Okay. I did something after googling. Here what I did:

jonstark@jonstark-pc:~$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/jonstark/.ssh/id_rsa): ocean Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in ocean. Your public key has been saved in ocean.pub. The key fingerprint is: b6:8e:de:5f:37:2f:b6:96:d2:53:16:89:ef:a8:1c:5a jonstark@jonstark-pc The key's randomart image is: +--[ RSA 2048]----+ | | | | | . .| | . o | | S . .| | . . .o| | . E..=+ | | + +.ooB+ | | .o oo.o.+.+.| +-----------------+

然后我找到了这个生成的ocean.pub文件并将ssh密钥复制粘贴到数字海洋

Then I found this generated ocean.pub file and copy paste the ssh key to digital ocean

但我想我做错了所有事情,我不应该将密钥存储在 Ocean.pub 中,而是存储在/.ssh/idrsapub 中.

But I gues I did everything wrong and I should not store the key in ocean.pub but in /.ssh/idrsapub instead.

好吧,我也是这样做的:

Okay also I did this:

jonstark@jonstark-pc:~$ ssh-copy-id dokku@45.55.21.53 /usr/bin/ssh-copy-id: ERROR: No identities found

我还是一头雾水

我现在该怎么办?

推荐答案

要在 ubuntu 中获取公钥,您可以尝试 cat ~/.ssh/id_rsa.pub

To get your public key in ubuntu you can try cat ~/.ssh/id_rsa.pub

如果这不起作用,您可能需要设置 ssh 密钥.可以在这里找到一个很好的逐步教程

If that doesn`t work you probably have to setup your ssh keys. A good tutorial step by step can be found here

更多推荐

未找到将 Rails 应用部署到数字海洋 dokku ssh 密钥

本文发布于:2023-10-28 04:06:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1535468.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:密钥   未找到   海洋   数字   dokku

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!