我是NodeJS开发的新手。
我在主机Windows机器上通过VirtualBox将Ubuntu 14.04设置为来宾操作系统。当我输入Ubuntu ifconfig
时,我得到了ip地址192.168.8.101
。我还在Windows主机文件中添加了一个条目,以便jl.gamatrix.com
指向该地址。我在ubuntu机器上检查了一个git项目,设置了节点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"
}
}
}
}
答案 0 :(得分:0)
尝试设置文件的权限(chmod -x):
production : {
user : "emd",
host : "someserver.com",
ref : "origin/master",
repo : "bb_gamatrix_deploy:emd/meanjs-gamatrix.git",
path : "/home/emd/gamatrix-prod/",
pre-deploy: "npm install",
post-deploy : "chmod -x ecosystem.json && bower install && pm2 startOrRestart ecosystem.json --env production"
}