我把一个图书馆推到了bitbucket作为公共回购。我希望它的链接在package.json依赖项对象中使用。我尝试了各种https格式,但没有一种格式正在运行。
"library_name": "https://username@bitbucket.org/repo_name.git"
"library_name": bitbucket://bitbucket.com/username/repo_name.git
"library_name": "bitbucket@bitbucket.com:username/repo_name.git#master
或者我可以在bower.json中添加它?我不想像npm install repo_url
那样直接使用它我得到的错误就像是
ECMDERR Failed to execute "git ls-remote --tags --heads https://username@bitbucket.org/dv.keystone.git", exit code of #128 remote: Not Found fatal: unable to access 'https://username@bitbucket.org/reponame.git/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.
remote: Not Found
fatal: unable to access 'https://username@bitbucket.org/repo_name.git/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.
更新
"lib_name": "https://username@bitbucket.org/team_name/repo_name.git"
它适用于bower.json,但我需要在package.json中使用它。如果我在package.json中使用它,则会出现此错误
npm ERR! addLocal Could not install /tmp/npm-16628-b0121d64/git-cache-cbc9eb1e/7c4c6a5fb3e77723f3866c99fdf0825ba7cc0c5c
npm ERR! Linux 4.13.0-39-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v6.12.3
npm ERR! npm v3.10.10
npm ERR! code EISDIR
npm ERR! errno -21
npm ERR! syscall read
npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.
答案 0 :(得分:2)
我不知道如何在content.values()
.stream()
.collect(Collectors.groupingBy(n -> n.divide(range, BigDecimal.ROUND_FLOOR), Collectors.counting()))
中添加BitBucket模块。我的方式是添加github repo,
package.json
所以考虑只更换github部分应该是
"library-name": "git+https://github.com/user/library-name.git"
答案 1 :(得分:1)
有些谷歌搜索 - 因为我不确定自己。
这可能对您有用:
git+https://bitbucket.org/{user}/{repo}.git