【问题标题】:Deploying basic node.js app to openshift gives errors on git push将基本 node.js 应用程序部署到 openshift 会导致 git push 错误
【发布时间】:2014-02-28 21:17:16
【问题描述】:
  • 我使用openshift网站上的程序设置了一个默认节点应用程序,
  • 在我的 ubuntu 机器上做了一个 git clone,
  • 编辑了 readme.md,
  • 提交了
  • 并尝试推送到 repo
  • 有很多 npm fetch failed 错误,还有很多 - Error: SELF_SIGNED_CERT_IN_CHAIN 错误

    ... 远程:npm 错误!获取失败https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz 远程: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
    

查看日志没有帮助。 帮助表示赞赏。

【问题讨论】:

    标签: node.js openshift


    【解决方案1】:

    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 ""

    【讨论】:

    • npm config set ca "" 为我工作。我尝试安装新版本的 npm,但出现相同的错误:SELF_SIGNED_CERT_IN_CHAIN
    【解决方案2】:

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

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

    再次推送您的代码

    【讨论】:

    • 不使用 https 更像是一种肮脏的黑客攻击
    【解决方案3】:

    将您的 package.js 发送到这里

    查看依赖块:

    negotiator:"0.4.1"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-04
      • 1970-01-01
      • 2020-11-29
      • 2020-08-28
      • 1970-01-01
      • 1970-01-01
      • 2016-02-10
      相关资源
      最近更新 更多