Skip to content

Commit

Permalink
add option for skipping SSL verification (#265)
Browse files Browse the repository at this point in the history
* add option for skipping SSL verification

Signed-off-by: Varsha Munishwar <[email protected]>

* update GIT_SSL_NO_VERIFY

Signed-off-by: Varsha Munishwar <[email protected]>

---------

Signed-off-by: Varsha Munishwar <[email protected]>
  • Loading branch information
vmunishwar committed Oct 4, 2023
1 parent 15ded16 commit 76cea07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
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

0 comments on commit 76cea07

Please sign in to comment.