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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b5257d9b1cf01ab204ce56063f27a2e52b90b602986b931399ed6abb1273fc9
|
|
| MD5 |
b21f18f60ad46706da5c4f6bebb51cb9
|
|
| BLAKE2b-256 |
131e8aa6cd456b8be546592c25e92d33739ae808144eeca4d524864ca24d6bd1
|
File details
Details for the file poetry_private_repository-0.1.0-py3-none-any.whl.
File metadata
- Download URL: poetry_private_repository-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.9 Linux/6.8.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b867c9895e91840ae715fa290ab6fe0a67524a303a2beddaedb6f8a78ce09cda
|
|
| MD5 |
e76545f3776d9b5edbf702c4ee4e20b0
|
|
| BLAKE2b-256 |
d6e4d8475c0e61ffe4fb27ff87c19a18689815aba1c9497a6864e5988e5cac82
|