应用部署到数字海洋

应用部署到数字海洋

本文介绍了未找到将 Rails 应用部署到数字海洋 dokku ssh 密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

当我这样做时:

首先,您需要复制计算机的公共 SSH 密钥.转到您的终端并运行:$ 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 [email protected]
/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 密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 08:32