0

I'm working with private module that i created. they are stored into my private git server.

i set the dependencies for that modules successfully using :

"dependencies" :
{ 
"mymodule" : "git+ssh://git@git.myrepo.com/myproject#mybranch"
}

now i interested in publishing new release of this module without committing manually this branch. Is that possible to use something like : npm --registry git+ssh://git@git.myrepo.com/myproject#mybranch publish

in order to push my local update directly from where i used it to my branch ?

by the way the previous cmd return this error : in the next foo is the username i created with npm adduser

npm --registry "git+ssh://git@git.myrepo.com/myproject#mybranch" publish
npm WARN package.json foo@2.0.0 No README.md file found!
npm http PUT git+ssh://git@git.myrepo.com/foo
npm ERR! Error: Invalid protocol
npm ERR!     at Request.init (/usr/local/lib/node_modules/npm/node_modules/requ/main.js:302:31)
npm ERR!     at new Request (/usr/local/lib/node_modules/npm/node_modules/request/main.js:103:8)
npm ERR!     at request (/usr/local/lib/node_modules/npm/node_modules/request/main.js:956:11)
npm ERR!     at RegClient.makeRequest (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:208:13)
npm ERR!     at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:117:17)
npm ERR!     at RetryOperation.attempt (/usr/local/lib/node_modules/npm/node_modules/retry/lib/retry_operation.js:56:8)
npm ERR!     at RegClient.regRequest [as request] (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:114:13)
npm ERR!     at RegClient.publish (/usr/local/lib/node_modules/npm/node_module/npm-registry-client/lib/publish.js:51:8)
npm ERR!     at publish_ (/usr/local/lib/node_modules/npm/lib/publish.js:95:12)
npm ERR!     at Array.1 (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)

if someone know a solution to this problem or a clue , I'll really appreciate that.

Ostro

4

1 回答 1

0

到目前为止,您可能已经对此有了答案 - 所以这更适合访客。

经过一段时间的头痛后,我得出结论,从注册表以外的任何地方安装节点模块会导致比它解决的问题更多的问题。我假设您和我一样在寻找企业级工作流程,而不是快速修复。

我能建议的最好的事情是使用这个小宝石 --> https://github.com/rlidwka/sinopia

运行本地 npm 注册表可为您提供更好的 npm 集成。

我的设置是由 Git 支持并使用更新后挂钩连接的 Sinopia。

试试看=]

于 2013-11-22T12:02:21.710 回答