mirror of
https://github.com/outbackdingo/ghorg.git
synced 2026-01-27 10:19:03 +00:00
Update gitea to include insecure flag on baseurl
This commit is contained in:
@@ -3,9 +3,9 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
|
||||
## [1.8.9] - unreleased
|
||||
## [1.9.0] - unreleased
|
||||
### Added
|
||||
- GHORG_INSECURE_GITEA_CLIENT to allow cloning from Gitea instances using http; thanks @zerrol
|
||||
- GHORG_INSECURE_GITEA_CLIENT to be explicit when cloning from Gitea instances using http; thanks @zerrol
|
||||
### Changed
|
||||
### Deprecated
|
||||
### Removed
|
||||
|
||||
@@ -102,6 +102,12 @@ func (_ Gitea) NewClient() (Client, error) {
|
||||
baseURL = "https://gitea.com"
|
||||
}
|
||||
|
||||
isHTTP := strings.HasPrefix(baseURL, "http://")
|
||||
|
||||
if isHTTP && (os.Getenv("GHORG_INSECURE_GITEA_CLIENT") != "true") {
|
||||
colorlog.PrintErrorAndExit("You are attempting clone from an insecure Gitea instance. You must set the (--insecure-gitea-client) flag to proceed.")
|
||||
}
|
||||
|
||||
c, err := gitea.NewClient(baseURL, gitea.SetToken(token))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user