将基本node.js应用程序部署到openshift会在git push上出错

时间:2014-02-28 05:13:08

标签: node.js openshift

  • 我使用openshift网站上的程序
  • 设置了一个默认节点应用程序
  • 在我的ubuntu盒子上做了一个git clone,
  • 编辑了readme.md,
  • 做了提交
  • 并尝试推进回购
  • 得到了很多npm fetch失败错误,以及很多错误:SELF_SIGNED_CERT_IN_CHAIN错误

    ...     遥控器:npm ERR!提取失败https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz     remote:npm info retry将重试,上次尝试时出错:错误:SELF_SIGNED_CERT_IN_CHAIN

    remote: npm http GET https://registry.npmjs.org/negotiator/-/negotiator-0.3.0.tgz
    remote: npm ERR! Error: SELF_SIGNED_CERT_IN_CHAIN
    remote: npm ERR!     at SecurePair.<anonymous> (tls.js:1283:32)
    remote: npm ERR!     at SecurePair.EventEmitter.emit (events.js:92:17)
    remote: npm ERR!     at SecurePair.maybeInitFinished (tls.js:896:10)
    remote: npm ERR!     at CleartextStream.read [as _read] (tls.js:430:15)
    remote: npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:304:10)
    remote: npm ERR!     at EncryptedStream.write [as _write] (tls.js:344:25)
    remote: npm ERR!     at doWrite (_stream_writable.js:211:10)
    remote: npm ERR!     at writeOrBuffer (_stream_writable.js:201:5)
    remote: npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:172:11)
    remote: npm ERR!     at write (_stream_readable.js:557:24)
    remote: npm ERR!     at flow (_stream_readable.js:566:7)
    remote: npm ERR!     at Socket.pipeOnReadable (_stream_readable.js:598:5)
    
    remote: npm info preuninstall commander@1.3.2
    remote: npm info uninstall commander@1.3.2
    remote: npm info postuninstall commander@1.3.2
    remote: npm ERR!
    remote: npm ERR! Additional logging details can be found in:
    remote: npm ERR!     /var/lib/openshift/53100d354382ec58b5000032/app-root/runtime/repo/npm-debug.log
    remote: npm ERR! not ok code 0
    remote: An error occurred executing 'gear postreceive' (exit code: 1)
    remote: Error message: CLIENT_ERROR: Failed to execute: 'control build' for /var/lib/openshift/53100d354382ec58b5000032/nodejs
    remote:
    remote: For more details about the problem, try running the command again with the '--trace' option
    To ssh://53100d354382ec58b5000032@pmcloud-stellagreen.rhcloud.com/~/git/pmcloud.git/
       c851403..54dc73a  master -> master
    

查看日志并没有帮助。 帮助赞赏。

3 个答案:

答案 0 :(得分:3)

npm在他们的博客上承认了这个错误:http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more

  

解决方案:

     

1)升级您的npm版本

     

npm install npm -g    - 或 -

     

2)告诉你当前版本的npm使用已知的注册商

     

npm config set ca ""

答案 1 :(得分:1)

ssh到您的应用,然后设置http为npm

npm config set registry="http://registry.npmjs.org/"

再次推送您的代码

答案 2 :(得分:0)

发送您的package.js

查看依赖块:

negotiator:"0.4.1"