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

Use go-getter only for archive fetches #3297

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions api/loader/getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,21 @@ func getRemoteTarget(rs *remoteTargetSpec) error {
log.Fatalf("Error getting wd: %s", err)
}

httpGetter := &getter.HttpGetter{
Netrc: true,
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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


opts := []getter.ClientOption{}
client := &getter.Client{
Ctx: context.TODO(),
Src: rs.Raw,
Dst: rs.Dir.String(),
Pwd: pwd,
Mode: getter.ClientModeAny,
Detectors: []getter.Detector{
new(getter.GitHubDetector),
new(getter.GitLabDetector),
new(getter.GitDetector),
new(getter.BitBucketDetector),
Ctx: context.TODO(),
Src: rs.Raw,
Dst: rs.Dir.String(),
Pwd: pwd,
Mode: getter.ClientModeDir,
Detectors: []getter.Detector{},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The detectors were only used to transform git style urls but we don't want to handle those here.

Getters: map[string]getter.Getter{
"http": httpGetter,
"https": httpGetter,
},
Options: opts,
}
Expand Down