Skip to main content

No project description provided

Project description

Private repository

To use a private repository with Poetry, you can configure it to authenticate and install packages from the repository.

1. Add the Private Repository to Poetry

poetry config repositories.<repository-name> <repository-url>
  • Replace <repository-name> with a name for the repository (e.g., my-private-repo).
  • Replace <repository-url> with the URL of your private repository.
poetry config repositories.my-private-repo https://my-private-repo.example.com/simple

2. Authenticate with the Repository

If your private repository requires authentication, configure the credentials:

poetry config http-basic.<repository-name> <username> <password>
  • Replace <repository-name> with the same name as above.
  • Replace <username> and <password> with your repository credentials.
poetry config http-basic.my-private-repo my-username my-password

3. Add Dependencies from the Private Repository

poetry add <package-name> --source <repository-name>
poetry add my-private-package --source my-private-repo

4. Check Configuration

You can confirm your repository and authentication settings with.

poetry config --list

5. Using the pyproject.toml File

[[tool.poetry.source]]
name = "my-private-repo"
url = "https://my-private-repo.example.com/simple"
default = false

When a dependency is added, it will reference the private repository:

[tool.poetry.dependencies]
my-private-package = { version = "^1.0.0", source = "my-private-repo" }

6. Testing Installation

Run the following to verify the setup:

poetry install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poetry_private_repository-0.1.0.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poetry_private_repository-0.1.0-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file poetry_private_repository-0.1.0.tar.gz.

File metadata

  • Download URL: poetry_private_repository-0.1.0.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.9 Linux/6.8.0-1017-azure

File hashes

Hashes for poetry_private_repository-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2b5257d9b1cf01ab204ce56063f27a2e52b90b602986b931399ed6abb1273fc9
MD5 b21f18f60ad46706da5c4f6bebb51cb9
BLAKE2b-256 131e8aa6cd456b8be546592c25e92d33739ae808144eeca4d524864ca24d6bd1

See more details on using hashes here.

File details

Details for the file poetry_private_repository-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for poetry_private_repository-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b867c9895e91840ae715fa290ab6fe0a67524a303a2beddaedb6f8a78ce09cda
MD5 e76545f3776d9b5edbf702c4ee4e20b0
BLAKE2b-256 d6e4d8475c0e61ffe4fb27ff87c19a18689815aba1c9497a6864e5988e5cac82

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page