制作git pull请求的Yarn / NPM脚本失败

时间:2017-02-24 20:41:11

标签: json git ubuntu npm yarnpkg

我正在使用Vagrant虚拟化在本地计算机上处​​理WP项目。

我在package.json中创建了一个脚本,这样我就可以轻松地合并我的分支,推送到Gitlab并通过NPM或Yarn在我的暂存环境中拉出git repo

我将我的登台服务器的公钥添加到我的gitlab项目中的部署密钥中,对其进行了测试并且可以正常工作。

我的package.json内容:

{
  "name": "axis",
  "version": "1.0.0",
  "description": "A development environment based on Vagrant, optimized for WP development",
   "devDependencies": {
    "autoprefixer": "latest",
    "node-sass": "latest",
    "watch": "latest",
    "onchange": "latest",
    "postcss-cli": "latest"
  },
  "scripts": {
    "build":      "node-sass www/wp-content/themes/axis/sass/screen.scss www/wp-content/themes/axis/stylesheets/screen.css && yarn run autopre",
    "autopre":    "postcss --use autoprefixer www/wp-content/themes/axis/stylesheets/*.css -d www/wp-content/themes/axis/stylesheets/",
    "watch":      "yarn run watch:css",
    "watch:css" : "onchange 'www/wp-content/themes/axis/sass/**/*' -- yarn run build",
    "gitmerge": "git checkout staging && git merge dev && git checkout dev && git push --all origin && ssh ***@***.nl \" cd www/axis.nl && echo 'it works till here' && git pull origin staging;\""
  }
}

当我运行脚本时,我收到以下错误:

Permission denied (publickey). fatal: Could not read from remote repository.

以下是奇怪的部分: 当我一步一步地重复命令时,我没有收到错误,它成功地撤回了回购。

如果我谷歌这个错误,我会得到数千次点击,但不是针对这种特定情况。

任何有类似情况的人?

0 个答案:

没有答案