Skip to content

Add option repository.company.verify_ssl #1928

Closed
@p-rogalski

Description

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

When defining an index with PDM, one can skip SSL verification with verify_ssl = false. This does not work for repositories.

Describe the solution you'd like

Add the option repository.company.verify_ssl. This is especially useful for private company repositories.

Activity

frostming

frostming commented on May 18, 2023

@frostming
Collaborator

Would you like to PR?

p-rogalski

p-rogalski commented on May 22, 2023

@p-rogalski
ContributorAuthor

Sure, I will try!

p-rogalski

p-rogalski commented on May 25, 2023

@p-rogalski
ContributorAuthor

Could you give me a hint where to look?

frostming

frostming commented on May 25, 2023

@frostming
Collaborator

Since it is already able to be saved in the config, just not taking effect, you can simply add it to the Repository object:

if config is None:
raise PdmUsageError(f"Missing repository config of {repository}")
assert config.url is not None
if username is not None:
config.username = username
if password is not None:
config.password = password
if ca_certs is not None:
config.ca_certs = ca_certs
return Repository(project, config.url, config.username, config.password, config.ca_certs)

The verify_ssl value can be accessed by config.verify_ssl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Add option repository.company.verify_ssl · Issue #1928 · pdm-project/pdm