[Bug] Cannot install module from git repositories with SSH
See original GitHub issue- I’d be willing to implement a fix
Describe the bug
I tried to migrate Yarn v2 from v1.
I have two packages stored in the private git repository(GitLab). It could be installed with Yarn v1 without any problem. Here is the part of the package.json
file.
"dependencies": {
"my-engine": "git+ssh://git@gitlab.my-site.io:my-project/my-engine.git#4.2.1",
}
However, after upgrading to yarn@berry
and running yarn
command, I’ve got the error like below.
Or installing from CLI also failed.
When I changeed the target repository url to git+https
, It worked but I had to log in my private repository from CLI, which is not a proper case for me in favor of CI configuration.
To Reproduce
- Try to install module from any repository with SSH.
- Adding module directly in the
package.json
file. - Using
yarn add
command.
- Adding module directly in the
Environment if relevant (please complete the following information):
- OS: [macOS 10.15.2]
- Node version [12.13.0]
- Yarn version [2.0.0-rc.27]
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Building private GitHub repositories with sub-modules
The problem arises when sub-modules refer private Git repositories which cannot be cloned without authentication and as a result you get stalled build....
Read more >unable to install go module (private nested repository) - GitLab
Summary. When using go modules, I cannot install a module - private gitlab repository that is nested within a subgroup.
Read more >Cannot install an npm dependency through a private github ...
I am trying to add an npm dependency from a private github repository. ... "some-module": "git+ssh://git@github.com:user/some-module.git#dev",.
Read more >Private repo, git clone succeeds, npm install fails
If I clone the repo then npm install in the cloned directory then everything is fine -- so that shouldn't be the problem...
Read more >npm install is unable to fetch dependencies because ssh ...
I'm using ssh keys to access git repos, defined in VCS for the given project. Cloning is done from a private github repos...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I came across this same issue, dug into the gitUtils and realized you can just do an
git@
in the path like:git@domain:location/of/repo.git
. Worked like a charm after that.Hi! 👋
This issue looks stale, and doesn’t feature the
reproducible
label - which implies that you didn’t provide a working reproduction using Sherlock. As a result, it’ll be closed in a few days unless a maintainer explicitly vouches for it or you edit your first post to include a formal reproduction (you can use the playground for that).Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we’re a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolution faster). It helps us help you! 😃
If you absolutely cannot reproduce a bug on Sherlock (for example because it’s a Windows-only issue), a maintainer will have to manually add the
upholded
label.