-
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
Failing to upload to JFrog Artifactory v1.5.x #2143
Comments
A 500 Error sounds like there is some bug in artifactory. Do you have access to the logs of the server? |
I am seeing a similar error. Similar repo. In my case the error is: 415 Client Error: Unsupported Media Type for url: https://artifactory.my.url/artifactory/api/pypi/pypi-shared/simple/ |
I'm getting the same error as well on Poetry 1.0.5.
I have no access to server side logs to provide. EDIT: Older versions of Artifactory are affected by this issue, resolved in v6.1.0. |
Ok. I was able to work around this by removing 'simple' from the path per this post: #708 some app 'bar' poetry config repositories.foo https://artifactory.foo.com/artifactory/api/pypi/pypi-shared/
poetry publish --build -r foo then in a dependent project, I can add this library via poetry notice that the url ends with //pyproject.toml [[tool.poetry.source]]
name = "artifactory"
url = "https://artifactory/api/pypi/local-pypi/simple"
|
Worth noting, that this seems to be doc'd: https://www.jfrog.com/confluence/display/JFROG/PyPI+Repositories
|
Hello there After further investigation, the version of our internal artifactory needs to use the old The workaround I've found was to:
The script I've built is the following:
For now, is working until we migrate to a newer version of JFrog. |
While others have gotten this working in #3052 and #3059, I kinda had it working but then it failed on me for reasons I don't understand. My current solution is to define a repo at runtime inside of the Makefile I'm using: # the source in pyproject.toml to publish to
PUBLISH_SOURCE = myinternalrepo
PUBLISH_URL ?= $(shell $(POETRY) run python -c "import toml; from urllib.parse import urljoin; print(urljoin(next(filter(lambda s: s['name'] == '$(PUBLISH_SOURCE)', toml.load('pyproject.toml')['tool']['poetry']['source']))['url'], '.'))")
.PHONY: publish
publish: ## Publish a build to the configured repo
POETRY_REPOSITORIES_PUBLISH_URL=$(PUBLISH_URL) \
$(POETRY) publish \
--repository publish My CI (Vela) runs it like this: - name: publish
image: repo.example.com/python/poetry:latest
secrets:
- source: artifactory_username
target: poetry_http_basic_publish_username
- source: artifactory_password
target: poetry_http_basic_publish_password
ruleset:
event:
- tag
commands:
- poetry version $(git describe --tags)
- make build publish This feels pretty awkward. I wish that Poetry could either detect the need to lop off [[tool.poetry.source]]
name = "myinternalrepo"
url = "https://repo.example.com/artifactory/api/pypi/myinternalrepo/simple"
publish_url = "https://repo.example.com/artifactory/api/pypi/myinternalrepo" |
Closing for now as not a Poetry issue -- @colindean if you want to take your proposal and turn it into a concrete FR or a PR, please do! |
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).Issue
When executing
I got this:
The text was updated successfully, but these errors were encountered: