Repository: pypa/pipenv

Issue:
git remote address modified changing underscore to a hyphen...
I noticed that after pipenv announces successful install of a private repo from gitlab:

pipenv install -e git+git@gitlab.com:_orangenero/db.git#egg=db;

... I get an error from pip

pip.exceptions.InstallationError: Command "git clone -q git@gitlab.com:-orangenero/db.git /tmp/pip-8ySH2I-export" failed with error code 128 in None

Notice pip has been passed a modified gitlab groupname that transforms the underscore to a hyphen. In this case:

"_orangenero" to "-orangenero"

or, 

git clone -q git@gitlab.com:-orangenero/db.git /tmp/pip-8ySH2I-export




Discussion:
@minskmaz, I believe we addressed this late in the 7.X releases or early 8.X. Could you please provide the version of pipenv you're currently using?
@nateprewitt pipenv, version 8.2.5
Can reproduce.  Working on a fix now.
fix merged
Thank you @nateprewitt / @kennethreitz but I'm not certain its fixed. I'm now on version 8.2.6 as you see here:

Removing intermediate container e57341c44ad5
Step 10/15 : RUN pipenv --version
 ---> Running in f93d1756481f
pipenv, version 8.2.6

But I am still getting the pip error below after pipenv installs the egg:

Installing -e git+git@gitlab.com:_orangenero/allspark.git#egg=allspark…
Obtaining allspark from git+git@gitlab.com:_orangenero/allspark.git#egg=allspark
  Updating /root/.local/share/virtualenvs/iota-9BD0xIDx/src/allspark clone
Installing collected packages: allspark
  Found existing installation: allspark 0.0.post0.dev7+ng5af9e93
    Uninstalling allspark-0.0.post0.dev7+ng5af9e93:
      Successfully uninstalled allspark-0.0.post0.dev7+ng5af9e93
  Running setup.py develop for allspark
Successfully installed allspark

Adding -e git+git@gitlab.com:_orangenero/allspark.git#egg=allspark to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
fatal: strange pathname '-orangenero/allspark.git' blocked
Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/cli.py", line 1852, in install
    do_lock(system=system, pre=pre)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/cli.py", line 1083, in do_lock
    pre=pre
  File "/usr/local/lib/python2.7/dist-packages/pipenv/utils.py", line 421, in resolve_deps
    resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/piptools/resolver.py", line 101, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/piptools/resolver.py", line 199, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/piptools/resolver.py", line 274, in _iter_dependencies
    for dependency in self.repository.get_dependencies(ireq):
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 171, in get_dependencies
    result = reqset._prepare_file(self.finder, ireq)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/req/req_set.py", line 521, in _prepare_file
    req_to_install.update_editable(not self.is_download)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/req/req_install.py", line 587, in update_editable
    vcs_backend.export(self.source_dir)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/vcs/git.py", line 69, in export
    self.unpack(temp_dir)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/vcs/__init__.py", line 286, in unpack
    self.obtain(location)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/vcs/git.py", line 142, in obtain
    self.run_command(['clone', '-q', url, dest])
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/vcs/__init__.py", line 325, in run_command
    spinner)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "git clone -q git@gitlab.com:-orangenero/allspark.git /tmp/pip-Gniraz-export" failed with error code 128 in None
Installing -e git+git@gitlab.com:_orangenero/scheduler.git#egg=scheduler…

With the current release I am getting this error when I try to install your package:

```fish
 /t/new  pipenv install -e git+git@gitlab.com:_orangenero/db.git#egg=db                                                                                                            Sun 01 Oct 2017 07:24:50 PM EDT
Installing -e git+git@gitlab.com:_orangenero/db.git#egg=db…
Obtaining db from git+git@gitlab.com:_orangenero/db.git#egg=db
  Cloning git@gitlab.com:_orangenero/db.git to /home/hawk/.local/share/virtualenvs/new-X2WGxJLe/src/db
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

pip.exceptions.InstallationError: Command "git clone -q git@gitlab.com:_orangenero/db.git /home/hawk/.local/share/virtualenvs/new-X2WGxJLe/src/db" failed with error code 128 in None

Error:  An error occurred while installing -e git+git@gitlab.com:_orangenero/db.git#egg=db!
Command "git clone -q git@gitlab.com:_orangenero/db.git /home/hawk/.local/share/virtualenvs/new-X2WGxJLe/src/db" failed with error code 128 in None
```

There doesn't seem to be anything in the codebase that would still cause this translation to occur
I think it is a private package, I couldn't clone it either.
There is another little fix for this that will be in the next release!
Can you point me at the hash? I know it was private but the relevant bit was that the InstallationError didn't replace the _ in the clone command.  Since he couldn't install it either, I didn't think the fact it wouldn't successfully install was relevant -- whether it was private wouldn't matter since the alternative was that it tried to install a package that didnt exist
Apologies. This should work for you now. I used PyScaffold to generate myspecialpackage. I just made this - so it's public
 
https://gitlab.com/_orangenero/myspecialpackage




I can check tomorrow morning.  Thanks for making the link public!
URL replacement still is not happening for me using the current release of pipenv -- is there a change that was already pushed and released? If so can you point me at the hash for it?  Just curious as to what code would be doing this, I couldn't find it

@minskmaz are you sure you have the right version?  Maybe try to uninstall and reinstall pipenv with `--no-cache-dir`

```ShellSession
$ pipenv install -e git+https://gitlab.com/_orangenero/myspecialpackage.git#egg=myspecialpackage
Installing -e git+https://gitlab.com/_orangenero/myspecialpackage.git#egg=myspecialpackage…
Obtaining myspecialpackage from git+https://gitlab.com/_orangenero/myspecialpackage.git#egg=myspecialpackage
  Cloning https://gitlab.com/_orangenero/myspecialpackage.git to /home/hawk/.local/share/virtualenvs/new-X2WGxJLe/src/myspecialpackage
Installing collected packages: myspecialpackage
  Running setup.py develop for myspecialpackage
Successfully installed myspecialpackage

Adding -e git+https://gitlab.com/_orangenero/myspecialpackage.git#egg=myspecialpackage to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (032075)!
$ pipenv --version                                                                                                                                                  
pipenv, version 8.2.6
```


Did as you suggested:
```
Collecting pipenv
  Downloading pipenv-8.2.6.tar.gz (3.7MB)
```

Still get this:

```
Virtualenv location: /root/.local/share/virtualenvs/iota-9BD0xIDx
Requirements file provided! Importing into Pipfile…
Installing dependencies from Pipfile.lock (342c3e)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 95/95 — 00:05:49
To activate this project's virtualenv, run the following:
 $ pipenv shell
Installing -e git+git@gitlab.com:_orangenero/allspark.git#egg=allspark…
Obtaining allspark from git+git@gitlab.com:_orangenero/allspark.git#egg=allspark
  Cloning git@gitlab.com:_orangenero/allspark.git to /root/.local/share/virtualenvs/iota-9BD0xIDx/src/allspark
Installing collected packages: allspark
  Running setup.py develop for allspark
Successfully installed allspark

Adding -e git+git@gitlab.com:_orangenero/allspark.git#egg=allspark to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
fatal: strange pathname '-orangenero/allspark.git' blocked
Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==8.2.6', 'console_scripts', 'pipenv')()
  File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/cli.py", line 1852, in install
    do_lock(system=system, pre=pre)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/cli.py", line 1083, in do_lock
    pre=pre
  File "/usr/local/lib/python2.7/dist-packages/pipenv/utils.py", line 421, in resolve_deps
    resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/piptools/resolver.py", line 101, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/piptools/resolver.py", line 199, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/piptools/resolver.py", line 274, in _iter_dependencies
    for dependency in self.repository.get_dependencies(ireq):
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 171, in get_dependencies
    result = reqset._prepare_file(self.finder, ireq)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/req/req_set.py", line 521, in _prepare_file
    req_to_install.update_editable(not self.is_download)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/req/req_install.py", line 587, in update_editable
    vcs_backend.export(self.source_dir)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/vcs/git.py", line 69, in export
    self.unpack(temp_dir)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/vcs/__init__.py", line 286, in unpack
    self.obtain(location)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/vcs/git.py", line 142, in obtain
    self.run_command(['clone', '-q', url, dest])
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/vcs/__init__.py", line 325, in run_command
    spinner)
  File "/usr/local/lib/python2.7/dist-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "git clone -q git@gitlab.com:-orangenero/allspark.git /tmp/pip-mAzkz2-export" failed with error code 128 in None
Installing -e git+git@gitlab.com:_orangenero/scheduler.git#egg=scheduler…

```



@techalchemy this is all occuring in a docker container and my version is 8.2.6 as you can see directly above
Huh.   What if you use git+https?  does it still fail?  I'm just wondering why it worked for me and not for you
@minskmaz Can you post your Dockerfile?  Working on a fix, think I know what's wrong here
@kennethreitz @erinxocon I've verified that this bug(?) lives on. You should be able to reproduce it with this shell script.

https://gist.github.com/minskmaz/572884f38f194389fddbd716d100077f
Since you didn't test with `git+https` I went ahead and created an account on gitlab just for the purpose of troubleshooting this.

When I use pipenv to install over `git+https` I have no issues:

```shell
 ◰³ tempenv-6b109962c2c  /t/new  pipenv install -e git+https://gitlab.com/_orangenero/myspecialpackage.git#egg=myspecialpackage
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project.
Creating a Pipfile for this project…
Installing -e git+https://gitlab.com/_orangenero/myspecialpackage.git#egg=myspecialpackage…
Obtaining myspecialpackage from git+https://gitlab.com/_orangenero/myspecialpackage.git#egg=myspecialpackage
  Cloning https://gitlab.com/_orangenero/myspecialpackage.git to /home/hawk/.virtualenvs/tempenv-6b109962c2c/src/myspecialpackage
Installing collected packages: myspecialpackage
  Found existing installation: myspecialpackage 0.0.post0.dev1+ng9cde9d5
    Uninstalling myspecialpackage-0.0.post0.dev1+ng9cde9d5:
      Successfully uninstalled myspecialpackage-0.0.post0.dev1+ng9cde9d5
  Running setup.py develop for myspecialpackage
Successfully installed myspecialpackage

Adding -e git+https://gitlab.com/_orangenero/myspecialpackage.git#egg=myspecialpackage to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (032075)!
```

However, now that I have an account with gitlab and have registered my pubkey I can actually attempt this over ssh and I am experiencing the mentioned substitution:

```shell
◰³ tempenv-6b109962c2c  /t/new  pipenv install -e git+git@gitlab.com:_orangenero/myspecialpackage.git#egg=myspecialpackage
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project.
Installing -e git+git@gitlab.com:_orangenero/myspecialpackage.git#egg=myspecialpackage…
Obtaining myspecialpackage from git+git@gitlab.com:_orangenero/myspecialpackage.git#egg=myspecialpackage
  Cloning git@gitlab.com:_orangenero/myspecialpackage.git to /home/hawk/.virtualenvs/tempenv-6b109962c2c/src/myspecialpackage
Installing collected packages: myspecialpackage
  Running setup.py develop for myspecialpackage
Successfully installed myspecialpackage

Adding -e git+git@gitlab.com:_orangenero/myspecialpackage.git#egg=myspecialpackage to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
fatal: strange pathname '-orangenero/myspecialpackage.git' blocked
Traceback (most recent call last):
  File "/home/hawk/.pyenv/versions/3.6.2/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==8.2.6', 'console_scripts', 'pipenv')()
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/cli.py", line 1852, in install
    do_lock(system=system, pre=pre)
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/cli.py", line 1083, in do_lock
    pre=pre
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/utils.py", line 421, in resolve_deps
    resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 101, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 199, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 274, in _iter_dependencies
    for dependency in self.repository.get_dependencies(ireq):
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 171, in get_dependencies
    result = reqset._prepare_file(self.finder, ireq)
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/req/req_set.py", line 521, in _prepare_file
    req_to_install.update_editable(not self.is_download)
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/req/req_install.py", line 587, in update_editable
    vcs_backend.export(self.source_dir)
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/vcs/git.py", line 69, in export
    self.unpack(temp_dir)
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/vcs/__init__.py", line 286, in unpack
    self.obtain(location)
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/vcs/git.py", line 142, in obtain
   self.run_command(['clone', '-q', url, dest])
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/vcs/__init__.py", line 325, in run_command
    spinner)
  File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "git clone -q git@gitlab.com:-orangenero/myspecialpackage.git /tmp/pip-ljsuskl2-export" failed with error code 128 in None
```
I see the issue.  The library we are using for requirements parsing doesn't accurately flag this as a VCS path because it isn't written as `git+git://gitlab.com`

I'll submit a PR to address this in pipenv but I don't know if that's the right place to address it
Thank you for taking the time to track down the problem. I will revert to https. I suppose this would have kept popping up so at least it’ll be resolved upstream that much sooner.

> On Oct 4, 2017, at 5:13 PM, Dan Ryan <notifications@github.com> wrote:
> 
> Since you didn't test with git+https I went ahead and created an account on gitlab just for the purpose of troubleshooting this.
> 
> When I use pipenv to install over git+https I have no issues:
> 
>  ◰³ tempenv-6b109962c2c  /t/new  pipenv install -e git+https://gitlab.com/_orangenero/myspecialpackage.git#egg=myspecialpackage
> Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project.
> Creating a Pipfile for this project…
> Installing -e git+https://gitlab.com/_orangenero/myspecialpackage.git#egg=myspecialpackage…
> Obtaining myspecialpackage from git+https://gitlab.com/_orangenero/myspecialpackage.git#egg=myspecialpackage
>   Cloning https://gitlab.com/_orangenero/myspecialpackage.git to /home/hawk/.virtualenvs/tempenv-6b109962c2c/src/myspecialpackage
> Installing collected packages: myspecialpackage
>   Found existing installation: myspecialpackage 0.0.post0.dev1+ng9cde9d5
>     Uninstalling myspecialpackage-0.0.post0.dev1+ng9cde9d5:
>       Successfully uninstalled myspecialpackage-0.0.post0.dev1+ng9cde9d5
>   Running setup.py develop for myspecialpackage
> Successfully installed myspecialpackage
> 
> Adding -e git+https://gitlab.com/_orangenero/myspecialpackage.git#egg=myspecialpackage to Pipfile's [packages]…
> Locking [dev-packages] dependencies…
> Locking [packages] dependencies…
> Updated Pipfile.lock (032075)!
> However, now that I have an account with gitlab and have registered my pubkey I can actually attempt this over ssh and I am experiencing the mentioned substitution:
> 
> ◰³ tempenv-6b109962c2c  /t/new  pipenv install -e git+git@gitlab.com:_orangenero/myspecialpackage.git#egg=myspecialpackage
> Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project.
> Installing -e git+git@gitlab.com:_orangenero/myspecialpackage.git#egg=myspecialpackage…
> Obtaining myspecialpackage from git+git@gitlab.com:_orangenero/myspecialpackage.git#egg=myspecialpackage
>   Cloning git@gitlab.com:_orangenero/myspecialpackage.git to /home/hawk/.virtualenvs/tempenv-6b109962c2c/src/myspecialpackage
> Installing collected packages: myspecialpackage
>   Running setup.py develop for myspecialpackage
> Successfully installed myspecialpackage
> 
> Adding -e git+git@gitlab.com:_orangenero/myspecialpackage.git#egg=myspecialpackage to Pipfile's [packages]…
> Locking [dev-packages] dependencies…
> Locking [packages] dependencies…
> fatal: strange pathname '-orangenero/myspecialpackage.git' blocked
> Traceback (most recent call last):
>   File "/home/hawk/.pyenv/versions/3.6.2/bin/pipenv", line 11, in <module>
>     load_entry_point('pipenv==8.2.6', 'console_scripts', 'pipenv')()
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
>     return self.main(*args, **kwargs)
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
>     rv = self.invoke(ctx)
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
>     return _process_result(sub_ctx.command.invoke(sub_ctx))
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
>     return ctx.invoke(self.callback, **ctx.params)
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
>     return callback(*args, **kwargs)
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/cli.py", line 1852, in install
>     do_lock(system=system, pre=pre)
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/cli.py", line 1083, in do_lock
>     pre=pre
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/utils.py", line 421, in resolve_deps
>     resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 101, in resolve
>     has_changed, best_matches = self._resolve_one_round()
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 199, in _resolve_one_round
>     for dep in self._iter_dependencies(best_match):
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 274, in _iter_dependencies
>     for dependency in self.repository.get_dependencies(ireq):
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 171, in get_dependencies
>     result = reqset._prepare_file(self.finder, ireq)
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/req/req_set.py", line 521, in _prepare_file
>     req_to_install.update_editable(not self.is_download)
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/req/req_install.py", line 587, in update_editable
>     vcs_backend.export(self.source_dir)
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/vcs/git.py", line 69, in export
>     self.unpack(temp_dir)
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/vcs/__init__.py", line 286, in unpack
>     self.obtain(location)
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/vcs/git.py", line 142, in obtain
>    self.run_command(['clone', '-q', url, dest])
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/vcs/__init__.py", line 325, in run_command
>     spinner)
>   File "/home/hawk/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
>     % (command_desc, proc.returncode, cwd))
> pip.exceptions.InstallationError: Command "git clone -q git@gitlab.com:-orangenero/myspecialpackage.git /tmp/pip-ljsuskl2-export" failed with error code 128 in None
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or mute the thread.
> 


Resolving patch:
diff --git a/pipenv/project.py b/pipenv/project.py
--- a/pipenv/project.py
+++ b/pipenv/project.py
@@ -60,15 +60,16 @@ def _build_package_list(self, package_section):
             if hasattr(v, 'keys'):
                 # When a vcs url is gven without editable it only appears as a key
                 if is_vcs(v) or is_vcs(k):
+                    # Non-editable VCS entries can't be resolved by piptools
                     if 'editable' not in v:
                         continue
                     else:
                         ps.update({k: v})
                 else:
-                    if not is_file(v) and not is_file(k) and not is_vcs(v) and not is_vcs(k):
+                    if not is_file(v) and not is_file(k):
                         ps.update({k: v})
             else:
-                if not is_vcs(k) and not is_file(k):
+                if not is_vcs(k) and not is_file(k) and not is_vcs(v):
                     ps.update({k: v})
         return ps
 
diff --git a/pipenv/utils.py b/pipenv/utils.py
--- a/pipenv/utils.py
+++ b/pipenv/utils.py
@@ -496,6 +496,7 @@ def convert_deps_from_pip(dep):
     req = [r for r in requirements.parse(dep)][0]
     extras = {'extras': req.extras}
 
+
     # File installs.
     if (req.uri or (os.path.exists(req.path) if req.path else False) or
             os.path.exists(req.name)) and not req.vcs:
@@ -517,8 +518,8 @@ def convert_deps_from_pip(dep):
         if req.editable:
             dependency[req.name].update({'editable': True})
 
-    # VCS Installs.
-    if req.vcs:
+    # VCS Installs. Extra check for unparsed git over SSH
+    if req.vcs or is_vcs(req.path):
         if req.name is None:
             raise ValueError('pipenv requires an #egg fragment for version controlled '
                              'dependencies. Please install remote dependency '
@@ -528,6 +529,12 @@ def convert_deps_from_pip(dep):
         if req.extras:
             dependency[req.name] = extras
 
+        # Set up this requirement as a proper VCS requirement if it was not
+        if not req.vcs and req.path.startswith(VCS_LIST):
+            req.vcs = [vcs for vcs in VCS_LIST if req.path.startswith(vcs)][0]
+            req.uri = '{0}'.format(req.path)
+            req.path = None
+
         # Crop off the git+, etc part.
         dependency.setdefault(req.name, {}).update({req.vcs: req.uri[len(req.vcs) + 1:]})
 


Test patch: