pdm icon indicating copy to clipboard operation
pdm copied to clipboard

Allow configuration of publishing repository to be locally set

Open smokeythemonkey opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

When trying updating the config.toml with new access token to a private PyPI server on MacOS (pdm config repository.xxx <url>), the config.toml is not updated. Only deleting the contents of config.toml then configuring the repository works.

When configuring the url, user and password locally the following message appears when trying to publish.

test  🍣 main 📝 ×1🐍  v3.10.4 .venv ☁️    eu-central-1 
🕙 08:55:12 🐟 ❯ pdm publish-atlas
Building sdist...
Built sdist at /home/awol/Projects/test/dist/test-0.1.0.tar.gz
Building wheel...
Built wheel at /home/awol/Projects/test/dist/test-0.1.0-py3-none-any.whl
[PdmUsageError]: Missing repository config of xxx

Describe the solution you'd like

Allow setting of publishing repository locally to .pdm.toml using --local flag

smokeythemonkey avatar Aug 08 '22 07:08 smokeythemonkey

You may use the wrong command, it's pdm config repository.<repo_name>.url <url>

And I see no point supporting --local for this config.

frostming avatar Aug 08 '22 07:08 frostming

Why not? I have multiple private repositories that I need to publish to, but I don't want to ever accidentally publish across to the wrong one, setting it on per-project basis would avoid this problem. I have the repo in my local pdm.toml and there's no complaints, pdm config even reports it as being part of my local config, so implementing it can't be much harder than just checking repos in the local config too.

krruzic avatar Nov 17 '23 22:11 krruzic