Skip to content

feat: add --insecure for login command to skip tls verify#139

Merged
gaius-qi merged 1 commit intomainfrom
feat/login-insecure
Mar 25, 2025
Merged

feat: add --insecure for login command to skip tls verify#139
gaius-qi merged 1 commit intomainfrom
feat/login-insecure

Conversation

@chlins
Copy link
Member

@chlins chlins commented Mar 25, 2025

This pull request introduces support for insecure connections to the registry by adding a new Insecure flag and updating the relevant code to handle this new option. The most important changes include modifications to the command-line interface, backend login logic, and configuration structure.

Command-line Interface Updates:

  • Added a new --insecure flag to the login command to allow insecure connections to the registry (cmd/login.go).

Backend Login Logic:

  • Imported necessary packages for handling HTTP and TLS configurations (pkg/backend/login.go).
  • Updated the Login function to configure the HTTP client with the InsecureSkipVerify option based on the new Insecure flag (pkg/backend/login.go).

Configuration Structure:

  • Added an Insecure boolean field to the Login struct to store the insecure connection option (pkg/config/login.go).
  • Initialized the Insecure field in the NewLogin function to its default value (pkg/config/login.go).

Signed-off-by: chlins <chlins.zhang@gmail.com>
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaius-qi gaius-qi merged commit 5a5ed89 into main Mar 25, 2025
4 checks passed
@gaius-qi gaius-qi deleted the feat/login-insecure branch March 25, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants