Browse Source

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

pull/5446/head
Unknwon 6 years ago
parent
commit
aff0bbcc32
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      conf/app.ini
  2. 2
      gogs.go
  3. 62
      pkg/bindata/bindata.go
  4. 4
      pkg/ssh/ssh.go
  5. 2
      templates/.VERSION

2
conf/app.ini

@ -96,7 +96,7 @@ ENABLE_LOCAL_PATH_MIGRATION = false
; 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
; 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
; Enable render mode for raw file
ENABLE_RAW_FILE_RENDER_MODE = false

2
gogs.go

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

62
pkg/bindata/bindata.go

File diff suppressed because one or more lines are too long

4
pkg/ssh/ssh.go

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

2
templates/.VERSION

@ -1 +1 @@
0.11.66.0916
0.11.66.0928

Loading…
Cancel
Save