0

我正在尝试按照教程在 forge 和 AWS 上创建服务器

在我第一次尝试时,我在配置上卡住了 20 多分钟,所以我决定删除它并重试。

现在,当我在 SSH 进入 aws 时从 Forge 执行代码时,出现错误

“错误:角色“forge”已经存在”但是我实际上并没有在我知道的任何地方指定“forge”角色

我还被要求覆盖我的 ssh 密钥,我尝试了是和否,但我仍然卡在同一个服务器配置上。

有谁知道该怎么做?真的很想将我的代码投入生产:-)

编辑:这是一项正在进行的工作,将根据需要更新

current workflow
 - delete previous 'provisioning' server on forge
 - ssh into aws
 - aws listed as 'ubuntu@previousforgeservername' - something is happening anyway
 - tried to continue with process, get same error 'role forge already exists'
 - new attempt, $ ps aux | grep forge // lists instances running as 'forge'
 - delete them (3 running ) with pkill -9 'id'
 - sudo rm forge.sh // download again
 - run the code wget -0 .... to download forge.sh and provision server
 - same bs.. 

useradd: user 'forge' already exists
The user `forge' is already a member of `sudo'.
Generating public/private rsa key pair.
/home/forge/.ssh/id_rsa already exists.
Overwrite (y/n)?

不知道在这里做什么。都试过y/n

结果相同的错误

错误:角色“forge”已经存在

如何删除角色?

ubuntu@polished-badlands:~$ ps aux | grep forge
forge     7797  0.0  0.9 473836  9448 ?        S    17:21   0:00 php-fpm: pool www
forge     7801  0.0  0.3 148640  3432 ?        S    17:21   0:00 nginx: worker process
forge     7804  0.0  0.9 473836  9448 ?        S    17:21   0:00 php-fpm: pool www
ubuntu    7806  0.0  0.0  12952   928 pts/0    S+   17:21   0:00 grep --color=auto forge
ubuntu@polished-badlands:~$ sudo userdel -r forge
userdel: user forge is currently used by process 7797
ubuntu@polished-badlands:~$ sudo kill 7797
ubuntu@polished-badlands:~$ sudo userdel -r forge
userdel: user forge is currently used by process 7801
ubuntu@polished-badlands:~$ sudo kill 7801
ubuntu@polished-badlands:~$ sudo userdel -r forge
userdel: user forge is currently used by process 7804
4

1 回答 1

0

我的错

在构建期间,我为伪造的 ssh 指定了我自己的 ip。需要按照指南中的说明进行操作。

希望这对某人有帮助!

于 2017-04-10T20:09:12.713 回答