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

add option for skipping SSL verification #265

Merged
merged 2 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions pkg/vendir/config/directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ type DirectoryContentsGit struct {
// +optional
SecretRef *DirectoryContentsLocalRef `json:"secretRef,omitempty"`
// +optional
LFSSkipSmudge bool `json:"lfsSkipSmudge,omitempty"`
SkipInitSubmodules bool `json:"skipInitSubmodules,omitempty"`
Depth int `json:"depth,omitempty"`
LFSSkipSmudge bool `json:"lfsSkipSmudge,omitempty"`
SkipSSLVerification bool `json:"skipSSLVerification,omitempty"`
SkipInitSubmodules bool `json:"skipInitSubmodules,omitempty"`
Depth int `json:"depth,omitempty"`
}

type DirectoryContentsGitVerification struct {
Expand Down
4 changes: 3 additions & 1 deletion pkg/vendir/fetch/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ func (t *Git) fetch(dstPath string, tempArea ctlfetch.TempArea) error {
if t.opts.LFSSkipSmudge {
env = append(env, "GIT_LFS_SKIP_SMUDGE=1")
}

if t.opts.SkipSSLVerification {
env = append(env, "GIT_SSL_NO_VERIFY=true")
}
gitURL := t.opts.URL
gitCredsPath := filepath.Join(authDir, ".git-credentials")

Expand Down
Loading