mirror of
https://github.com/thegeeklab/wp-git-action.git
synced 2024-11-22 00:00:39 +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:
parent
1b0b01b69e
commit
6709777a8c
@ -111,10 +111,10 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
|
|||||||
Category: category,
|
Category: category,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "insecure-ssl-verify",
|
Name: "insecure-skip-ssl-verify",
|
||||||
Usage: "set SSL verification of the remote machine",
|
Usage: "skip ssl verification of the remote machine",
|
||||||
EnvVars: []string{"PLUGIN_INSECURE_SSL_VERIFY"},
|
EnvVars: []string{"PLUGIN_INSECURE_SKIP_SSL_VERIFY"},
|
||||||
Destination: &settings.Repo.InsecureSSLVerify,
|
Destination: &settings.Repo.InsecureSkipSSLVerify,
|
||||||
Value: false,
|
Value: false,
|
||||||
Category: category,
|
Category: category,
|
||||||
},
|
},
|
||||||
|
@ -68,9 +68,11 @@ properties:
|
|||||||
defaultvalue: false
|
defaultvalue: false
|
||||||
type: bool
|
type: bool
|
||||||
|
|
||||||
- name: insecure_ssl_verify
|
- name: insecure_skip_ssl_verify
|
||||||
description: Configure git SSL verification of the remote machine.
|
description: |
|
||||||
defaultvalue: false
|
Skip SSL verification of the remote machine. Activating this option is insecure
|
||||||
|
and should be avoided in most cases.
|
||||||
|
defaultvalue: true
|
||||||
type: bool
|
type: bool
|
||||||
|
|
||||||
- name: empty_commit
|
- name: empty_commit
|
||||||
|
@ -64,13 +64,13 @@ func ConfigUserName(repo Repository) *execabs.Cmd {
|
|||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
// repoSSLVerify disables globally the git ssl verification.
|
// ConfigSSLVerify disables globally the git ssl verification.
|
||||||
func ConfigSSLVerify(repo Repository) *execabs.Cmd {
|
func ConfigSSLVerify(repo Repository) *execabs.Cmd {
|
||||||
args := []string{
|
args := []string{
|
||||||
"config",
|
"config",
|
||||||
"--local",
|
"--local",
|
||||||
"http.sslVerify",
|
"http.sslVerify",
|
||||||
strconv.FormatBool(repo.SSLVerify),
|
strconv.FormatBool(!repo.InsecureSkipSSLVerify),
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := execabs.Command(
|
cmd := execabs.Command(
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package git
|
package git
|
||||||
|
|
||||||
|
const gitBin = "/usr/bin/git"
|
||||||
|
|
||||||
type Author struct {
|
type Author struct {
|
||||||
Name string
|
Name string
|
||||||
Email string
|
Email string
|
||||||
@ -15,15 +17,12 @@ type Repository struct {
|
|||||||
|
|
||||||
Autocorrect string
|
Autocorrect string
|
||||||
NoVerify bool
|
NoVerify bool
|
||||||
InsecureSSLVerify bool
|
InsecureSkipSSLVerify bool
|
||||||
EmptyCommit bool
|
EmptyCommit bool
|
||||||
PushFollowTags bool
|
PushFollowTags bool
|
||||||
ForcePush bool
|
ForcePush bool
|
||||||
SSLVerify bool
|
|
||||||
WorkDir string
|
WorkDir string
|
||||||
InitExists bool
|
InitExists bool
|
||||||
|
|
||||||
Author Author
|
Author Author
|
||||||
}
|
}
|
||||||
|
|
||||||
const gitBin = "/usr/bin/git"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user