【发布时间】:2017-01-16 19:58:39
【问题描述】:
我是 NodeJS 开发的新手。
我已经通过 VirtualBox 在 Windows 主机上将 Ubuntu 14.04 设置为来宾操作系统。当我输入 Ubuntu ifconfig 时,我得到了 IP 地址 192.168.8.101。我还在我的 Windows 主机文件中添加了一个条目,以便 jl.gamatrix.com 指向该地址。我在 ubuntu 机器上签出了一个 git 项目,设置了 node js 和 pm2 和 nginx。
当我输入时
pm2 deploy ecosystem.json5 jlgamatrix
我得到了输出
{
--> Deploying to jlgamatrix environment
--> on host jl.gamatrix.com
fatal: No upstream configured for branch 'master'
○ deploying origin/master
○ executing pre-deploy-local
○ hook pre-deploy
○ fetching updates
Warning: Permanently added the RSA host key for IP address '125.211.213.131' to the list of known hosts.
Password:
Password:
Password:
Permission denied (gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive).
fetch failed
每次它要求输入密码时,我都输入了正确的密码。为什么我不断收到被拒绝的权限?尤其是 git pull origin master 和 git push origin master 通过 bash 自己没有遇到任何问题?
这是我的ecosystem.json5 文件的样子:
apps : [
// First application
{
name : "gamatrix",
script : "/usr/local/bin/grunt",
env: {
COMMON_VARIABLE: "true"
},
env_production : {
NODE_ENV: "production"
}
},
],
deploy : {
production : {
user : "emd",
host : "someserver.com",
ref : "origin/master",
repo : "bb_gamatrix_deploy:emd/meanjs-gamatrix.git",
path : "/home/emd/gamatrix-prod/",
"post-deploy" : "npm install && bower install && pm2 startOrRestart ecosystem.json5 --env production"
},
jlgamatrix : {
user : "www-data",
host : "jl.gamatrix.com",
ref : "origin/master",
repo : "bb_gamatrix_deploy:eemd/meanjs-gamatrix.git",
path : "/var/www/nginx/gamatrix",
"post-deploy" : "npm install && bower install && pm2 startOrRestart ecosystem.json5 --env dev",
env : {
NODE_ENV: "jlgamatrix"
}
}
}
}
【问题讨论】: