0
0
mirror of https://github.com/thegeeklab/wp-git-action.git synced 2024-11-09 17:10:41 +00:00

fix: fix wrong handling of insecure-skip-ssl-verify param (#68)

BREAKING CHANGE: The parameter `insecure_ssl_verify` was renamed to `insecure_skip_ssl_verify`
This commit is contained in:
Robert Kaussow 2023-12-24 00:17:55 +01:00 committed by GitHub
parent 1b0b01b69e
commit 6709777a8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 20 deletions

View File

@ -111,10 +111,10 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
Category: category,
},
&cli.BoolFlag{
Name: "insecure-ssl-verify",
Usage: "set SSL verification of the remote machine",
EnvVars: []string{"PLUGIN_INSECURE_SSL_VERIFY"},
Destination: &settings.Repo.InsecureSSLVerify,
Name: "insecure-skip-ssl-verify",
Usage: "skip ssl verification of the remote machine",
EnvVars: []string{"PLUGIN_INSECURE_SKIP_SSL_VERIFY"},
Destination: &settings.Repo.InsecureSkipSSLVerify,
Value: false,
Category: category,
},

View File

@ -68,9 +68,11 @@ properties:
defaultvalue: false
type: bool
- name: insecure_ssl_verify
description: Configure git SSL verification of the remote machine.
defaultvalue: false
- name: insecure_skip_ssl_verify
description: |
Skip SSL verification of the remote machine. Activating this option is insecure
and should be avoided in most cases.
defaultvalue: true
type: bool
- name: empty_commit

View File

@ -64,13 +64,13 @@ func ConfigUserName(repo Repository) *execabs.Cmd {
return cmd
}
// repoSSLVerify disables globally the git ssl verification.
// ConfigSSLVerify disables globally the git ssl verification.
func ConfigSSLVerify(repo Repository) *execabs.Cmd {
args := []string{
"config",
"--local",
"http.sslVerify",
strconv.FormatBool(repo.SSLVerify),
strconv.FormatBool(!repo.InsecureSkipSSLVerify),
}
cmd := execabs.Command(

View File

@ -1,5 +1,7 @@
package git
const gitBin = "/usr/bin/git"
type Author struct {
Name string
Email string
@ -13,17 +15,14 @@ type Repository struct {
Add string
CommitMsg string
Autocorrect string
NoVerify bool
InsecureSSLVerify bool
EmptyCommit bool
PushFollowTags bool
ForcePush bool
SSLVerify bool
WorkDir string
InitExists bool
Autocorrect string
NoVerify bool
InsecureSkipSSLVerify bool
EmptyCommit bool
PushFollowTags bool
ForcePush bool
WorkDir string
InitExists bool
Author Author
}
const gitBin = "/usr/bin/git"