Skip to content

Support HTTP proxies and SSH for git-based dependencies - #543

Open
haarchri wants to merge 1 commit into
crossplane:mainfrom
haarchri:feat/git-proxy-ssh-support
Open

haarchri wants to merge 1 commit into
crossplane:mainfrom
haarchri:feat/git-proxy-ssh-support

Conversation

@haarchri

Copy link
Copy Markdown
Member

Description of your changes

Git-based crd dependencies currently support only direct HTTPS with optional username/token auth. This PR adds:

  • --git-proxy (CROSSPLANE_GIT_PROXY) on dependency add, dependency update-cache, and project build: tunnels git operations through an HTTP CONNECT proxy. For SSH URLs the connection is tunneled via CONNECT (a dialer for the http/https proxy schemes is registered with golang.org/x/net/proxy), so git-over-SSH works from behind corporate proxies.
  • Per-transport default auth providers: an SSH URL (git@host:path or ssh://) now defaults to SSH agent authentication with the username extracted from the URL; other URLs keep anonymous HTTPS. Previously SSH URLs had no working auth path unless the caller supplied a provider.
  • --git-insecure-host-key (CROSSPLANE_GIT_INSECURE_HOST_KEY): opt-in skipping of SSH host key verification, for environments where known_hosts provisioning isn't practical. Off by default; the flag help calls out the MITM risk.

Fixes #

I have:

Need help with this checklist? See the cheat sheet.

Validation

Unit tests for the proxy dialer (CONNECT handshake, auth, context cancellation), URL classification/username extraction, and provider selection; proxy settings apply to both clones and the SHA-checkout fetch path.

@haarchri
haarchri requested review from a team, jcogilvie and tampakrap as code owners November 18, 2026 13:52
@haarchri
haarchri requested review from adamwg and removed request for a team November 18, 2026 13:52
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3a126a7 and 6cd39d9.

Files ignored due to path filters: 2

  • go.mod is excluded by none and included by none
  • nix/vendor-hashes.nix is excluded by none and included by none
Files selected for processing: 7

  • cmd/crossplane/dependency/add.go
  • cmd/crossplane/dependency/cache.go
  • cmd/crossplane/project/build.go
  • internal/dependency/manager.go
  • internal/git/git.go
  • internal/git/proxy.go
  • internal/git/proxy_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Add HTTP CONNECT proxying (including SSH tunneling via CONNECT) and
opt-in SSH host key verification skipping for git-based dependencies,
with per-transport default auth providers (SSH agent for SSH URLs,
anonymous HTTPS otherwise). Exposed as --git-proxy and
--git-insecure-host-key on dependency add, dependency update-cache, and
project build.

Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
@haarchri
haarchri force-pushed the feat/git-proxy-ssh-support branch from b787616 to 6cd39d9 Compare November 18, 2026 14:06
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.

1 participant