Allow insecure connections to Gitlab (#234)
This MR makes it possible to ignore bad x509 certificates when connecting to Gitlab, by creating a custom HTTP connection. The option is exposed via the setup function. This is a PATCH release.
This commit is contained in:
committed by
GitHub
parent
670f08849f
commit
4f1fe4ae25
@@ -13,19 +13,16 @@ M.start = function(callback)
|
||||
local port = state.settings.port or empty_port
|
||||
local parsed_port = nil
|
||||
local callback_called = false
|
||||
local command = state.settings.bin
|
||||
.. " "
|
||||
.. state.settings.gitlab_url
|
||||
.. " "
|
||||
.. port
|
||||
.. " "
|
||||
.. state.settings.auth_token
|
||||
.. " "
|
||||
.. "'"
|
||||
.. vim.json.encode(state.settings.debug)
|
||||
.. "'"
|
||||
.. " "
|
||||
.. state.settings.log_path
|
||||
local command = string.format(
|
||||
"%s %s %s %s '%s' %s '%s'",
|
||||
state.settings.bin,
|
||||
state.settings.gitlab_url,
|
||||
port,
|
||||
state.settings.auth_token,
|
||||
vim.json.encode(state.settings.debug),
|
||||
state.settings.log_path,
|
||||
vim.json.encode(state.settings.connection_settings)
|
||||
)
|
||||
|
||||
local job_id = vim.fn.jobstart(command, {
|
||||
on_stdout = function(_, data)
|
||||
|
||||
@@ -20,6 +20,9 @@ M.settings = {
|
||||
imply_local = false,
|
||||
},
|
||||
},
|
||||
connection_settings = {
|
||||
insecure = true,
|
||||
},
|
||||
attachment_dir = "",
|
||||
help = "g?",
|
||||
popup = {
|
||||
|
||||
Reference in New Issue
Block a user