-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install from private github url #573
Comments
This is also the case for private URLs that require basic authentication, e.g. |
I've provided a simple workaround for authenticating via SSH in yarn at #513 (comment) that you can use until this issue is fixed. |
Looks like @ramasilveyra closed #971 in deference to #1081, but that PR didn't actually fix the problem, at least for me. I'm manually grabbing a non-published bleeding-edge version of yarn so that it will have #1081 in it, but I'm still getting this error:
Any suggestions what to change to get this to work? |
Eh, ignore my comment. I had universally installed a stable release version of yarn and due to how my VM is setup, this was the one it was referencing instead of the bleeding-edge local version. So that's why I was getting that error. I've confirmed I no longer get that error on the latest version. |
Sorry for the close, I don't think this is resolved by my PR |
* Fix private urls using colon separator Closes yarnpkg#573, closes yarnpkg#2416. Related to yarnpkg#2384, yarnpkg#573. * Remove unused suppression * Move to dedicated method & add tests
#2992 added support for private git repos when using shorted repo syntax (this landed on v0.24.0). The generation for the first time of a error An unexpected error occurred: "Invalid protocol: git+ssh:". That error comes from https://github.com/request/request/blob/b12a6245d9acdb1e13c6486d427801e123fdafae/request.js#L455 and I think (im not sure, still looking to the code trying to understand) it's because yarn tries to use the tarball fetcher instead of the git fetcher. UpdateThe offline feature/fix added recently makes the git resolver defaults to the tarball to avoid http calls https://github.com/yarnpkg/yarn/pull/3000/files |
@ramasilveyra, do you have a PR in mind that could fix it? |
@bestander Hey I just created a pr with the fix #3425, but I'm not sure if it's the best solution. |
This could be closed now, right? |
Last version fixes the problem. |
Just tried it and it doesn't work (github repo shorthand with private repo); it prompted me to enter my ssh key's passphrase but I cannot actually enter anything at all. |
Answering myself: #2992 (comment) |
**Summary** Yarn can not handle the `git+https://` dependency format correctly, as described for various versions in #1625. The problem is present in Yarn 1.2.1. A related problem for `git+ssh://` has been described in #573 and fixed in #3425. This PR extends the solution from #3425 to use the Git fetcher for any [Git-over-protocol](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols) URLs. **Test plan** Extended the `package-request` unit tests to verify that the correct remote type (git) is used for `git+https://`, while the tarball remote type continues to be used for regular HTTP(S) URLs.
…g#4759) **Summary** Yarn can not handle the `git+https://` dependency format correctly, as described for various versions in yarnpkg#1625. The problem is present in Yarn 1.2.1. A related problem for `git+ssh://` has been described in yarnpkg#573 and fixed in yarnpkg#3425. This PR extends the solution from yarnpkg#3425 to use the Git fetcher for any [Git-over-protocol](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols) URLs. **Test plan** Extended the `package-request` unit tests to verify that the correct remote type (git) is used for `git+https://`, while the tarball remote type continues to be used for regular HTTP(S) URLs.
This still doesn't work with yarn 1.3.2 Works —> macOS v10.13.1 |
This is definitely broken still, even with long form Git URLs. |
I can confirm that the following do not work on Yarn However, using HTTPS does work on yarn: Unfortunately, in my case, there are dependencies that use some of the above formats, so it looks like I cannot use |
if you added you public key to your github account this works: |
Do you want to request a feature or report a bug? Bug
What is the current behavior?
You can't install a package like
github:yarnpkg/yarn
because it is private even though ifWhat is the expected behavior?
It should be able to install the package like npm currently can.
The text was updated successfully, but these errors were encountered: