Skip to content
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

Reference git url with hash (i.e. for multi repo PR's) #708

Closed
jouni-kantola opened this issue Oct 11, 2016 · 2 comments
Closed

Reference git url with hash (i.e. for multi repo PR's) #708

jouni-kantola opened this issue Oct 11, 2016 · 2 comments

Comments

@jouni-kantola
Copy link

jouni-kantola commented Oct 11, 2016

Do you want to request a feature or report a bug?
I guess it's a Feature, but works in npm CLI

What is the current behavior?
When I reference a GitHub URL with hash, I get the error message:
error Couldn't find any versions for <module> that matches git@github.com:user/repo.git#abcd1234. Possible versions: 1.0.0

If the current behavior is a bug, please provide the steps to reproduce.

  1. Create a PR in git repo
  2. Reference the commit's git URL in package.json ("module": "<url#hash>")
  3. yarn install
  4. error: needs package version

What is the expected behavior?
We're using multiple git repositorys. At times we need to reference a PR commit by hash for testing, like git@github.com:user/repo.git#abcd1234. This would help if it works (which it does with the npm CLI).

Please mention your node.js, yarn and operating system version.
node.js: v6.4.0
yarn: 0.15.1
Windows 10

@milosivanovic
Copy link

milosivanovic commented Oct 11, 2016

Referencing a branch with a hash works fine in yarn.

What doesn't work is the fact that you're specifying git@ as the user, which is an open issue at #513.

Using the workaround at #513 (comment), specifying a source of ssh://github.com/user/repo.git#abcd1234 will pull the abcd1234 branch and work fine.

@jouni-kantola
Copy link
Author

@milosivanovic: Thank you; that worked well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants