mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-07 23:22:21 +00:00
Merge pull request #896 from Bugagazavr/gitlab-no-verify
Allow to skip verify in oauths requests
This commit is contained in:
commit
56aabe8c59
1 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
package gitlab
|
package gitlab
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
@ -278,6 +279,10 @@ func (r *Gitlab) GetToken(user *model.User) (*model.Token, error) {
|
||||||
RefreshToken: user.Secret,
|
RefreshToken: user.Secret,
|
||||||
Expiry: expiry,
|
Expiry: expiry,
|
||||||
},
|
},
|
||||||
|
Transport: &http.Transport{
|
||||||
|
Proxy: http.ProxyFromEnvironment,
|
||||||
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: r.SkipVerify},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := t.Refresh(); err != nil {
|
if err := t.Refresh(); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue