-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
poetry install
fails when installing dependencies, from git repositories, in gitlab CI.
#2475
Comments
Hello @pawelrubin, it looks a bit like fin swimmer |
The target here is a docker container (based on the image we provide) provisioned by Gitlab during the build time. |
I believe this problem is related to something I've experienced. It looks like
which cloned such repository under However, during a subsequent
Which makes total sense because there's no |
There does not appear to be any rush to fix this, so I guess there is a workaround. I wonder what that might be? Perhaps delete the virtualenv and start over?
|
I had a similar issue with a dependency from a private Gitlab repository that used SSH for cloning (same
I'm aware that the problem in the original comment might be something else (given that you, @pawelrubin, were trying to clone via HTTPS from a public repository), but maybe this will help other people ending up here when researching that error message. |
I know this is old... but a cleaner alternative that I found for github, guessing gitlab is similar
|
I had a similar issue and it turns out the problem was that the library I was referring to ( Adding the
This problem already has an issue at #3366. |
Experiencing this issue w/ a public GitHub repo. Here is my Poetry config:
And here at the GitLab CI Logs:
Anyone aware of a workaround? |
In case it helps anyone: I had the same "returned non-zero exit status 128" issue. I investigated it by just running this:
It turned out that /usr/local/src did not exist / wasn't writable, so totally a problem on my end. It would really be nice if Poetry could log the stderr of Git to make debugging situations like this easier. For those wondering: The path is coming from the pip_installer which uses |
@mrcljx Do you think you could explain what you changed? I tried the following: RUN useradd --create-home 1000
ENV PATH="/home/1000/.local/bin:${PATH}"
WORKDIR /usr/local/src/myproject
RUN chown -R 1000:1000 /usr/local/src/myproject
RUN chmod 755 /usr/local/src/myproject
RUN chmod 755 /usr/local/src/
USER 1000 but it's still giving me the same error:
This dependency is written in [tool.poetry.dependencies]
... (other dependencies)
"discord.py" = {git = "https://github.com/Rapptz/discord.py", extras = ["voice"]} The container is created without an issue if I run everything as root. Are you running Poetry as root? |
Experiencing exactly the same issue with 2 out of 4 github repositories. What the two that are failing have in common is that they both have submodules. Turns out I'd made a change to the way the submodules were being referenced. I was able to identify the issue by manually adding
This was not applying to the submodule and I got an authentication error when it tried to clone the submodule. I solved this by just updating the url to the submodules in .gitmodules. This may not be the same issue as exit status code 1 is rather uninformative, but adding the command manually to your pipeline should reveal the true cause. |
@phenry2
|
I just add |
Sounds like ^ was a default branch issue. #5428 should handle this cleaner. Would be great to get that changes tested by folks who have been having issues here. |
Resolved-by: #5428 |
This fails with the latest Poetry: pydantic = {git = "https://github.com/samuelcolvin/pydantic.git"} Commands: curl -sSL https://install.python-poetry.org | python3 -
poetry install --no-interaction --no-ansi --no-root --no-dev Traceback:
|
#5428 was merged against Could you try on latest beta? curl -sSL https://install.python-poetry.org | python3 - --preview Otherwise, for |
Tried upgrading to the preview version
|
This set me on the right track. It wasn't at all clear to me that there was a problem fetching a particular dependency via git from the error. If I had been told more explicitly "failed to get bla from git @ address" by poetry I might have been able to handle this on my own. |
Thx so much for your help. Same problem here. But we've fixed it by setting: |
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. |
-vvv
option).pip3 install poetry
)Issue
poetry install
fails when installing dependencies, from git repositories, in gitlab CI.It does work on my local machine. Dependency has been added via
poetry add git+https://github.com/devopshq/artifactory.git@support-python-38-glob
Traceback from
poetry install -vvv
:The text was updated successfully, but these errors were encountered: