Np2 initialization project Permissiondenied (publickey) error

problem description

np2 initialization project Permissiondenied (publickey,gssapi-keyex,gssapi-with-mic) reported an error

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

{

"apps":[{
    "name": "test",
    "script": "server.js",
    "watch": true,
    "env" : {
        "COMMON_VARIABLE": "true"
    },
    "env_production": {
        "NODE_ENV": "production"
    }
}],
"deploy":{
    "production" : {
        "user": "root",
        "host": ["111.231.x.x"],
        "ref": "origin/master",
        "repo": "git@gitee.com:soulferr/ice.git",
        "path": "/www/wwwroot/ice/production",
        "ssh_options": "StrictHostKeyChecking=no",
        "pre-deploy-local": "echo "Deploy Done!"", 
        "env": {
            "NODE_ENV": "production"
        }
    }
}

}

ssh directory files under the server

authorized_keys
config
id_rsa
id_rsa.pub
known_hosts

error message

--> Deploying to production environment
--> on host 111.231.x.x
0 hook pre-setup
root@111.231.x.x: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

setup paths failed

Deploy failed

what result do you expect? What is the error message actually seen?

Pm2
Mar.25,2021

messing around that the original ssh login certificate of Tencent Cloud server restricts the pm2 link to the host, which is terrible


how to solve it? I have been perplexed by this problem for several days

Menu