pkg/ssh: print actual error in panic (#5435)

This commit is contained in:
Unknwon 2018-09-28 15:37:34 -04:00
parent 33e009bedb
commit aff0bbcc32
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
5 changed files with 36 additions and 36 deletions

View File

@ -96,7 +96,7 @@ ENABLE_LOCAL_PATH_MIGRATION = false
; Concurrency is used to retrieve commits information. This variable define ; Concurrency is used to retrieve commits information. This variable define
; the maximum number of tasks that can be run at the same time. Usually, the ; the maximum number of tasks that can be run at the same time. Usually, the
; value depend of how many CPUs (cores) you have. If the value is set to zero ; value depend of how many CPUs (cores) you have. If the value is set to zero
; or under, GOGS will automatically detect the number of CPUs your system have ; or under, Gogs will automatically detect the number of CPUs your system have
COMMITS_FETCH_CONCURRENCY = 0 COMMITS_FETCH_CONCURRENCY = 0
; Enable render mode for raw file ; Enable render mode for raw file
ENABLE_RAW_FILE_RENDER_MODE = false ENABLE_RAW_FILE_RENDER_MODE = false

View File

@ -16,7 +16,7 @@ import (
"github.com/gogs/gogs/pkg/setting" "github.com/gogs/gogs/pkg/setting"
) )
const APP_VER = "0.11.66.0916" const APP_VER = "0.11.66.0928"
func init() { func init() {
setting.AppVer = APP_VER setting.AppVer = APP_VER

File diff suppressed because one or more lines are too long

View File

@ -175,11 +175,11 @@ func Listen(host string, port int, ciphers []string) {
privateBytes, err := ioutil.ReadFile(keyPath) privateBytes, err := ioutil.ReadFile(keyPath)
if err != nil { if err != nil {
panic("SSH: Fail to load private key") panic("SSH: Fail to load private key: " + err.Error())
} }
private, err := ssh.ParsePrivateKey(privateBytes) private, err := ssh.ParsePrivateKey(privateBytes)
if err != nil { if err != nil {
panic("SSH: Fail to parse private key") panic("SSH: Fail to parse private key: " + err.Error())
} }
config.AddHostKey(private) config.AddHostKey(private)

View File

@ -1 +1 @@
0.11.66.0916 0.11.66.0928