首页 > 解决方案 > pm2 密钥在 gitlab-ci 上的权限错误

问题描述

我想从 gitlab-ci runner 运行 pm2,但是在运行 pm2 之后,我有这个消息:

Warning: Permanently added 'xxxxxxx' (ECDSA) to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0755 for '/root/.ssh' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/root/.ssh": bad permissions
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
Deploy failed

我尝试设置chmod 600 ~/.ssh但没有结果。

任何人都可以帮助我吗?

标签: ubuntugitlab-cipm2

解决方案


推荐阅读