From 89942c6f95dacf782900c3853c0eff0dc186bb8f Mon Sep 17 00:00:00 2001 From: Bugagazavr Date: Tue, 9 Jun 2015 23:10:35 +0300 Subject: [PATCH] Fix self-signed certificates --- plugin/remote/gitlab/gitlab.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin/remote/gitlab/gitlab.go b/plugin/remote/gitlab/gitlab.go index f2e8834ce..314bb9998 100644 --- a/plugin/remote/gitlab/gitlab.go +++ b/plugin/remote/gitlab/gitlab.go @@ -56,7 +56,13 @@ func (r *Gitlab) Authorize(res http.ResponseWriter, req *http.Request) (*model.L return nil, fmt.Errorf("Error matching state in OAuth2 redirect") } - var trans = &oauth.Transport{Config: config} + var trans = &oauth.Transport{ + Config: config, + Transport: &http.Transport{ + Proxy: http.ProxyFromEnvironment, + TLSClientConfig: &tls.Config{InsecureSkipVerify: r.SkipVerify}, + }, + } var token, err = trans.Exchange(code) if err != nil { return nil, fmt.Errorf("Error exchanging token. %s", err)