python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.1k stars 2.25k forks source link

poetry add git+private repo fails with the latest git #1996

Closed mozesa closed 4 years ago

mozesa commented 4 years ago

Issue

It fails when I try to poetry add git+https://***@bitbucket.org/***/cognex.git. The pip install git+https://***@bitbucket.org/***/cognex.git with the 2.25.0 version of git also fails. I can install the package using pip by providing the password as well, like: pip install git+https://myusername:mypassword@bitbucket.org/itisme/cognex.git

But I cannot install the package from repo using poetry add git+https://myusername:mypassword@bitbucket.org/itisme/cognex.git.

Thanks for your help in advance!

(venv) C:\Users\***\PycharmProjects\V316-Production-Line>poetry add git+https://***@bitbucket.org/***/cognex.git -vvv
Using virtualenv: C:\Users\***\PycharmProjects\V316-Production-Line\venv

[CalledProcessError]
Command '['git', 'clone', 'https://andrasmozes@bitbucket.org/andrasmozes/cognex.git', 'C:\\Users\\***\\AppData\\Local\\Temp\\pypoetry-git-cognexr4ogrd1w']' returned non-zero exit status 128.

Traceback (most recent call last):
  File "C:\Users\***\.poetry\lib\poetry\_vendor\py3.8\clikit\console_application.py", line 131, in run
    status_code = command.handle(parsed_args, io)
  File "C:\Users\***\.poetry\lib\poetry\_vendor\py3.8\clikit\api\command\command.py", line 120, in handle
    status_code = self._do_handle(args, io)
  File "C:\Users\***\.poetry\lib\poetry\_vendor\py3.8\clikit\api\command\command.py", line 171, in _do_handle
    return getattr(handler, handler_method)(args, io, self)
  File "C:\Users\***\.poetry\lib\poetry\_vendor\py3.8\cleo\commands\command.py", line 92, in wrap_handle
    return self.handle()
  File "C:\Users\***\.poetry\lib\poetry\console\commands\add.py", line 88, in handle
    requirements = self._determine_requirements(
  File "C:\Users\***\.poetry\lib\poetry\console\commands\init.py", line 294, in _determine_requirements
    requires = self._parse_requirements(requires)
  File "C:\Users\***\.poetry\lib\poetry\console\commands\init.py", line 381, in _parse_requirements
    package = Provider.get_package_from_vcs(
  File "C:\Users\***\.poetry\lib\poetry\puzzle\provider.py", line 196, in get_package_from_vcs
    git.clone(url, tmp_dir)
  File "C:\Users\***\.poetry\lib\poetry\vcs\git.py", line 200, in clone
    return self.run("clone", repository, str(dest))
  File "C:\Users\***\.poetry\lib\poetry\vcs\git.py", line 282, in run
    subprocess.check_output(["git"] + list(args), stderr=subprocess.STDOUT)
  File "C:\Python\Python38-32\lib\subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Users\***\.poetry\lib\poetry\utils\_compat.py", line 205, in run
    raise CalledProcessError(
henhuy commented 3 years ago

I think this is related to https://github.com/python-poetry/poetry/issues/1255#issuecomment-680561465

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.