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

git/libgit2: add support for ssh proxy and tests #337

Merged
merged 4 commits into from
Nov 25, 2022
Merged

Conversation

aryan9600
Copy link
Member

This PR adds support for specifying custom proxies while using SSH and tests for both HTTP(S) and SSH proxies. It also adds a ClientOption to let users configure a proxy for the client.

@aryan9600 aryan9600 requested a review from pjbgf August 29, 2022 13:12
@aryan9600 aryan9600 added the area/git Git and SSH related issues and pull requests label Aug 29, 2022
@aryan9600 aryan9600 added this to the GA milestone Aug 29, 2022
git/libgit2/transport/ssh.go Outdated Show resolved Hide resolved
Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

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

We may want to first start using pkg/git into SC/IAC and review tests before adding new features or changing existing behaviour.

@pjbgf pjbgf modified the milestones: GA, Bootstrap GA Nov 22, 2022
@pjbgf
Copy link
Member

pjbgf commented Nov 22, 2022

Now that SC/IAC have the refactoring changes merges, we should be in a good place to merge this.

Please rebase.

Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

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

Tiny nits, apart from those LGTM.

git/libgit2/transport/http_proxy_test.go Outdated Show resolved Hide resolved
git/libgit2/transport/http_proxy_test.go Outdated Show resolved Hide resolved
@@ -31,6 +31,8 @@ replace github.com/go-git/go-billy/v5 => github.com/go-git/go-billy/v5 v5.3.2-0.
require (
github.com/Masterminds/semver/v3 v3.1.1
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
github.com/elazarl/goproxy v0.0.0-20220529153421-8ea89ba92021
Copy link
Member

Choose a reason for hiding this comment

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

github.com/elazarl/goproxy seems unmaintained, but mostly self-contained. It would be good to find an alternative at some point.

git/libgit2/transport/ssh_proxy_test.go Outdated Show resolved Hide resolved
Extend the libgit2 ssh transport to support custom proxies in addition
to reading env vars

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

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

LGTM

@pjbgf pjbgf merged commit 8b61e84 into fluxcd:main Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/git Git and SSH related issues and pull requests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants