Hi,
I'm trying to add a repository from bitbucket with ssh to a project.
With the following package.json, I had an error with the last dependency.
{
"dependencies": {
"githuHTTPS": "https://jeromelegrand@bitbucket.org/jeromelegrand/test.git",
"githubSSH": "git+ssh://git@github.com:jeromelegrand/test.git",
"bitbucketHTTPS": "https://git@bitbucket.org/jeromelegrand/test.git",
"bitbucketSSH": "git+ssh://git@bitbucket.org:jeromelegrand/test.git"
}
}
With YARN :
[1/4] 🔍 Resolving packages...
error Command failed.
Exit code: 1
Command: git
Arguments: archive --remote=git@bitbucket.org:jeromelegrand/test.git refs/heads/master package.json
Directory: /Users/jeromelegrand/test
Output:
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
With NPM:
npm ERR! premature close
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jeromelegrand/.npm/_logs/2020-01-25T13_11_55_287Z-debug.log
The log file :
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'i' ]
2 info using npm@6.12.1
3 info using node@v12.13.1
4 verbose npm-session 56f0567f3a5243c0
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall test
7 info lifecycle @~preinstall: @
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing stage:loadCurrentTree Completed in 8ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 2ms
16 silly install loadAllDepsIntoIdealTree
17 silly fetchPackageMetaData error for bitbucketHTTPS@git+https://git@bitbucket.org/jeromelegrand/test.git premature close
18 silly fetchPackageMetaData error for githuHTTPS@git+https://jeromelegrand@bitbucket.org/jeromelegrand/test.git premature close
19 silly fetchPackageMetaData error for githubSSH@git+ssh://git@github.com/jeromelegrand/test.git premature close
20 silly fetchPackageMetaData error for bitbucketSSH@git+ssh://git@bitbucket.org/jeromelegrand/test.git premature close
21 timing stage:rollbackFailedOptional Completed in 0ms
22 timing stage:runTopLevelLifecycles Completed in 3002ms
23 silly saveTree test
24 verbose stack Error: premature close
24 verbose stack at PassThrough.onclose (/usr/local/lib/node_modules/npm/node_modules/end-of-stream/index.js:47:67)
24 verbose stack at PassThrough.emit (events.js:215:7)
24 verbose stack at emitCloseNT (internal/streams/destroy.js:69:8)
24 verbose stack at processTicksAndRejections (internal/process/task_queues.js:79:21)
25 verbose cwd /Users/jeromelegrand/test
26 verbose Darwin 19.2.0
27 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
28 verbose node v12.13.1
29 verbose npm v6.12.1
30 error premature close
31 verbose exit [ 1, true ]
If I remove the last dependency, I had no error with YARN only.
{
"dependencies": {
"githuHTTPS": "https://jeromelegrand@bitbucket.org/jeromelegrand/test.git",
"githubSSH": "git+ssh://git@github.com:jeromelegrand/test.git",
"bitbucketHTTPS": "https://git@bitbucket.org/jeromelegrand/test.git"
}
}
With NPM, it never works.
Whith YARN and GITHIUB it works with HTTPS and SSH, but with BITBUCKET it only works with HTTPS.
I need to use BITBUCKET over SSH so, someone can help me ?
Thanks.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.