小编mat*_*un7的帖子

pm2 创建一个“源”目录并将我的所有文件复制到其中,为什么?

之前的问题我删了,因为不是很清楚,问题没有暴露出来。我有一个实例@aws,一个存储库@gitlab,并且设置了gitlab CI。我在 node.js 中做了一个小应用程序,因为我想尝试所有这些新东西。但是,当 gitlab-ci 运行脚本时,pm2 会在我的文件夹中创建一个“源”目录,然后将我的所有文件复制到该目录中,这显然是当前工作目录 (CWD)。这是一种令人惊讶的行为,我对此感到不舒服。

有谁知道为什么?正常吗?为什么我的文件不能保留在 ~/projet2/ 中,因为我设置了?

当我运行时pm2 show projet2,我可以看到exec cwdis /home/ubuntu/projet2/sourcewhilesource是一个我从未创建过的文件夹!

.git-ci.yml

# This file is a template, and might need editing before it works on your project.
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:alpine

stages:
  - deploy

deploy:
  stage: deploy
  before_script:
    # Install ssh-agent if not already installed, it is required by Docker.
    # (change apt-get to yum if …
Run Code Online (Sandbox Code Playgroud)

deployment amazon-web-services node.js pm2

7
推荐指数
1
解决办法
886
查看次数

gitlab CI:加载密钥时出错:格式无效

我被困在这个问题上 2 天了。

从我的生产服务器尝试使用 id_rsa.pub 和 id_rsa,仍然是同样的错误...... SSH_PRIVATE_KEY 是我在 GitLab 的 CI/CD 设置中创建的变量。

编辑:未受保护,未屏蔽。

# This file is a template, and might need editing before it works on your project.
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:alpine

stages:
  - deploy

deploy:
  stage: deploy
  before_script:
    # Install ssh-agent if not already installed, it is required by Docker.
    # (change apt-get to yum if you use a CentOS-based image)
    - 'which ssh-agent || ( …
Run Code Online (Sandbox Code Playgroud)

ssh amazon-web-services gitlab-ci

2
推荐指数
1
解决办法
5244
查看次数

标签 统计

amazon-web-services ×2

deployment ×1

gitlab-ci ×1

node.js ×1

pm2 ×1

ssh ×1