Skip to content

Commit

Permalink
Fix for gitextractor proxy config
Browse files Browse the repository at this point in the history
git.ProxyTypeSpecified should be used when specifying proxy address,
otherwise git seems to only use http_proxy configuration from
environment variables even when a proxy url has been given.
  • Loading branch information
albinvass committed Jun 26, 2023
1 parent 7842e85 commit ad680dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/plugins/gitextractor/parser/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (l *GitRepoCreator) CloneOverHTTP(repoId, url, user, password, proxy string
return withTempDirectory(func(dir string) (*GitRepo, error) {
cloneOptions := &git.CloneOptions{Bare: true}
if proxy != "" {
cloneOptions.FetchOptions.ProxyOptions.Type = git.ProxyTypeAuto
cloneOptions.FetchOptions.ProxyOptions.Type = git.ProxyTypeSpecified
cloneOptions.FetchOptions.ProxyOptions.Url = proxy
}
if user != "" {
Expand Down

0 comments on commit ad680dd

Please sign in to comment.