The current parsing code that tries to identify the package only allows for version constraints when using the package index. For git repositories, it just fails with an Error: Invalid package..
Ideally, the parsing should accept any string that the underlying Composer would be able to handle, with a fallback to building a proper GitHub URL for shortened syntax to account for the package index deprecation.