mirror of
https://github.com/gogs/gogs.git
synced 2025-12-23 00:30:03 +01:00
Enable Go modules (#5835)
* Remove vendor * Enable Go modules * ci: add command to fetch dependencies * ci: update setting * ci: update settings * Require Go 1.11 * Rename module name to gogs.io/gogs
This commit is contained in:
@@ -16,7 +16,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Unknwon/com"
|
||||
"github.com/unknwon/com"
|
||||
_ "github.com/go-macaron/cache/memcache"
|
||||
_ "github.com/go-macaron/cache/redis"
|
||||
"github.com/go-macaron/session"
|
||||
@@ -27,9 +27,9 @@ import (
|
||||
|
||||
"github.com/gogs/go-libravatar"
|
||||
|
||||
"github.com/gogs/gogs/pkg/bindata"
|
||||
"github.com/gogs/gogs/pkg/process"
|
||||
"github.com/gogs/gogs/pkg/user"
|
||||
"gogs.io/gogs/pkg/bindata"
|
||||
"gogs.io/gogs/pkg/process"
|
||||
"gogs.io/gogs/pkg/user"
|
||||
)
|
||||
|
||||
type Scheme string
|
||||
@@ -400,7 +400,7 @@ func getOpenSSHVersion() string {
|
||||
log.Fatal(2, "Fail to get OpenSSH version: %v - %s", err, stderr)
|
||||
}
|
||||
|
||||
// Trim unused information: https://github.com/gogs/gogs/issues/4507#issuecomment-305150441
|
||||
// Trim unused information: https://gogs.io/gogs/issues/4507#issuecomment-305150441
|
||||
version := strings.TrimRight(strings.Fields(stderr)[0], ",1234567890")
|
||||
version = strings.TrimSuffix(strings.TrimPrefix(version, "OpenSSH_"), "p")
|
||||
return version
|
||||
@@ -525,7 +525,7 @@ func NewContext() {
|
||||
}
|
||||
|
||||
// Check if server is eligible for minimum key size check when user choose to enable.
|
||||
// Windows server and OpenSSH version lower than 5.1 (https://github.com/gogs/gogs/issues/4507)
|
||||
// Windows server and OpenSSH version lower than 5.1 (https://gogs.io/gogs/issues/4507)
|
||||
// are forced to be disabled because the "ssh-keygen" in Windows does not print key type.
|
||||
if SSH.MinimumKeySizeCheck &&
|
||||
(IsWindows || version.Compare(getOpenSSHVersion(), "5.1", "<")) {
|
||||
|
||||
Reference in New Issue
Block a user