问题描述
在工作中,我们在一个HTTP代理之后,并且git协议(端口9418)被拒绝。
我的项目具有NPM依赖性,其中一些依赖项具有使用git协议的依赖项,例如:
在我的包中。 json
dependencies:{
jsdoc3:git + https: //github.com/jsdoc3/jsdoc.git
和 package.json
jsdoc3:
dependencies:{
crypto-browserify:git://github.com/dominictarr/crypto-browserify.git#95c5d505,
github-flavored-markdown:git://github.com/hegemonic/github -flavored-markdown.git
}
如何获得这些依赖关系,如何告诉NPM使用 git + https://
协议而不是 git://
协议或能够使用git协议?
为了简化我在Windows上的工作(在Linux上创建SSH隧道会更容易),并使用GIT-Bash。 p>
谢谢
git config --global url。https://.insteadOf git://
At work we are behind an HTTP Proxy and the git protocol (port 9418) is denied.My project has NPM dependencies and some of these dependencies have dependencies that use the git protocol, for instance:
In my package.json
"dependencies": {
"jsdoc3" : "git+https://github.com/jsdoc3/jsdoc.git"
}
and the package.json
of jsdoc3:
"dependencies": {
"crypto-browserify": "git://github.com/dominictarr/crypto-browserify.git#95c5d505",
"github-flavored-markdown": "git://github.com/hegemonic/github-flavored-markdown.git"
}
How can I get those dependencies, how to tell NPM to use git+https://
protocol instead of git://
protocol or to be able to use the git protocol?
To simplify things I'm on windows (it would be easier on Linux to create an SSH tunnel), and I use GIT-Bash.
Thanks
You can tell git to use https instead of git:// with the following command:
git config --global url."https://".insteadOf git://
这篇关于npm git协议依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!