Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tart {clone,pull}: support --proxy, --ca-cert and --max-retries #1037

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

edigaryev
Copy link
Collaborator

@edigaryev edigaryev commented Mar 7, 2025

With these options, we can first try to run tart {clone,pull} with --proxy <local caching HTTP proxy> --ca-cert <TLS interceptor's CA certificate> --max-retries 1, and if it fails, run it a second time without these options as a fallback.

The options are hidden for now because I'm not yet sure if it's the right approach.

@edigaryev edigaryev requested a review from fkorotkov as a code owner March 7, 2025 19:51
Copy link
Contributor

@fkorotkov fkorotkov left a comment

Choose a reason for hiding this comment

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

Also not sure about the the flags. What do you think of $TART_COME/config.json for this patter where proxy will be configured as a pair of URL and certificate?

throw RuntimeError.FailedToLoadCACertificate("failed to parse Base64-encoded PEM data")
}

self.caCert = SecCertificateCreateWithData(nil, caCertData as CFData)!
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it an additional one? It seems it's possible to pass a certificate without proxy and then I wonder if regular requests will work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not, but can be made so by calling SecTrustSetAnchorCertificatesOnly().

@edigaryev edigaryev requested a review from fkorotkov March 10, 2025 14:09
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