aboutsummaryrefslogtreecommitdiffstats
path: root/options.go
diff options
context:
space:
mode:
authorDaishan Peng <StrongMonkey@users.noreply.github.com>2021-01-27 02:48:41 -0700
committerGitHub <noreply@github.com>2021-01-27 10:48:41 +0100
commit1b1a61ad07f40197d3b9164821a096abd1710628 (patch)
tree7adecc024d32e52a54d919769941015308cf2bf1 /options.go
parentc6c9b100c97e356a653692fbed48cf8711d3e2a6 (diff)
downloadgo-git-1b1a61ad07f40197d3b9164821a096abd1710628.tar.gz
Add insecureSkipTLS and cabundle (#228)
This PR add insecureSkipTLSVerify and cabundle to any remote http calls so that https repo with private CA signed can be used. This is the equivalent of https.sslVerify and GIT_SSL_CAINFO
Diffstat (limited to 'options.go')
-rw-r--r--options.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/options.go b/options.go
index 2f93631..507fc07 100644
--- a/options.go
+++ b/options.go
@@ -60,6 +60,10 @@ type CloneOptions struct {
// Tags describe how the tags will be fetched from the remote repository,
// by default is AllTags.
Tags TagMode
+ // InsecureSkipTLS skips ssl verify if protocol is https
+ InsecureSkipTLS bool
+ // CABundle specify additional ca bundle with system cert pool
+ CABundle []byte
}
// Validate validates the fields and sets the default values.
@@ -105,6 +109,10 @@ type PullOptions struct {
// Force allows the pull to update a local branch even when the remote
// branch does not descend from it.
Force bool
+ // InsecureSkipTLS skips ssl verify if protocol is https
+ InsecureSkipTLS bool
+ // CABundle specify additional ca bundle with system cert pool
+ CABundle []byte
}
// Validate validates the fields and sets the default values.
@@ -155,6 +163,10 @@ type FetchOptions struct {
// Force allows the fetch to update a local branch even when the remote
// branch does not descend from it.
Force bool
+ // InsecureSkipTLS skips ssl verify if protocol is https
+ InsecureSkipTLS bool
+ // CABundle specify additional ca bundle with system cert pool
+ CABundle []byte
}
// Validate validates the fields and sets the default values.
@@ -194,6 +206,10 @@ type PushOptions struct {
// Force allows the push to update a remote branch even when the local
// branch does not descend from it.
Force bool
+ // InsecureSkipTLS skips ssl verify if protocal is https
+ InsecureSkipTLS bool
+ // CABundle specify additional ca bundle with system cert pool
+ CABundle []byte
}
// Validate validates the fields and sets the default values.
@@ -552,6 +568,10 @@ func (o *CreateTagOptions) loadConfigTagger(r *Repository) error {
type ListOptions struct {
// Auth credentials, if required, to use with the remote repository.
Auth transport.AuthMethod
+ // InsecureSkipTLS skips ssl verify if protocal is https
+ InsecureSkipTLS bool
+ // CABundle specify additional ca bundle with system cert pool
+ CABundle []byte
}
// CleanOptions describes how a clean should be performed.