-
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
hasHTTPCapability issue with bitbucket shortcut resolver and private repo #4393
Comments
This is a problem with |
@bertho-zero why do you think this is a bug? BitBucket indeed seems like to be supporting HTTP? This looks like a permission/credentials issue to me and the error message doesn't reflect that so may be we should update that instead? |
@BYK This is for a private repo so I would need to use the ssh connection, and currently I have a redirection (with status code 302) to the login page from the request to bitbucket. |
@bertho-zero are you providing the login credentials anyway? Guessing not so I'm not very surprised with the login page. Why is it not okay to use the |
@bertho-zero oh NVM, now I see the issue. I'm not sure if this is easily fixable since the HEAD request returns with a 302 instead of a 200. May be that's okay but I bet we should only expect a 2xx response from that. We may also look into adding specific protocol selectors for these such as |
I was trying to migrate from npm to yarn, I have a fifty repos that use shortcut and I do not want to modify all my package.json. |
@bertho-zero sorry, I wasn't proposing an "either/or" solution. I think the automatic check should be fixed. I'm asking in adding the protocol specifiers, in addition to that. |
…ivate repo (Closes yarnpkg#4393) * fix setRefRemote issue with exotic shortcut resolvers and branch/tag/commit
…tories (#4633) **Summary** * fix hasHTTPCapability issue with bitbucket shortcut resolver and private repo (#4393) *bug with a private repo that used like `"module": "bitbucket:team/repo"`* * fix setRefRemote issue with exotic shortcut resolvers and branch/tag/commit *bug with a repo that used like `"module": "bitbucket:team/repo#tag"`* **Test plan** If I have a private dependency like `"activities": "bitbucket:openagenda/activities"` in my package.json, and I run `yarn install --verbose` then I have this error: ``` [1/4] Resolving packages... verbose 0.407 Performing "HEAD" request to "https://bitbucket.org/openagenda/es-node". verbose 0.867 Request "https://bitbucket.org/openagenda/es-node" finished with status code 302. verbose 0.873 Performing "GET" request to "https://bitbucket.org/openagenda/es-node.git/info/refs?service=git-upload-pack". verbose 0.98 Request "https://bitbucket.org/openagenda/es-node.git/info/refs?service=git-upload-pack" finished with status code 401. verbose 0.981 Error: Error connecting to repository. Please, check the url. at /home/bertho/.config/yarn/global/node_modules/yarn/lib/cli.js:33269:15 at Generator.next (<anonymous>) at step (/home/bertho/.config/yarn/global/node_modules/yarn/lib/cli.js:92:30) at /home/bertho/.config/yarn/global/node_modules/yarn/lib/cli.js:103:13 at process._tickCallback (internal/process/next_tick.js:109:7) error An unexpected error occurred: "Error connecting to repository. Please, check the url.". info If you think this is a bug, please open a bug report with the information provided in "/home/bertho/OpenAgenda/cibul-node/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. ```
…tories (yarnpkg#4633) **Summary** * fix hasHTTPCapability issue with bitbucket shortcut resolver and private repo (yarnpkg#4393) *bug with a private repo that used like `"module": "bitbucket:team/repo"`* * fix setRefRemote issue with exotic shortcut resolvers and branch/tag/commit *bug with a repo that used like `"module": "bitbucket:team/repo#tag"`* **Test plan** If I have a private dependency like `"activities": "bitbucket:openagenda/activities"` in my package.json, and I run `yarn install --verbose` then I have this error: ``` [1/4] Resolving packages... verbose 0.407 Performing "HEAD" request to "https://bitbucket.org/openagenda/es-node". verbose 0.867 Request "https://bitbucket.org/openagenda/es-node" finished with status code 302. verbose 0.873 Performing "GET" request to "https://bitbucket.org/openagenda/es-node.git/info/refs?service=git-upload-pack". verbose 0.98 Request "https://bitbucket.org/openagenda/es-node.git/info/refs?service=git-upload-pack" finished with status code 401. verbose 0.981 Error: Error connecting to repository. Please, check the url. at /home/bertho/.config/yarn/global/node_modules/yarn/lib/cli.js:33269:15 at Generator.next (<anonymous>) at step (/home/bertho/.config/yarn/global/node_modules/yarn/lib/cli.js:92:30) at /home/bertho/.config/yarn/global/node_modules/yarn/lib/cli.js:103:13 at process._tickCallback (internal/process/next_tick.js:109:7) error An unexpected error occurred: "Error connecting to repository. Please, check the url.". info If you think this is a bug, please open a bug report with the information provided in "/home/bertho/OpenAgenda/cibul-node/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. ```
It's a bug.
If I have a private dependency like
"activities": "bitbucket:openagenda/activities"
in my package.json, and I runyarn install --verbose
then I have this error:How to force usage of ssh instead of https for a shortcut of github/bitbucket ?
Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: