mirror of
https://github.com/thomiceli/opengist.git
synced 2024-12-22 20:42:40 +00:00
Fix git clone on SSH with MySQL (#382)
This commit is contained in:
parent
c1e046f428
commit
40ff4c7b3f
2 changed files with 2 additions and 1 deletions
|
@ -19,7 +19,7 @@ const (
|
||||||
|
|
||||||
func GetSetting(key string) (string, error) {
|
func GetSetting(key string) (string, error) {
|
||||||
var setting AdminSetting
|
var setting AdminSetting
|
||||||
err := db.Where("key = ?", key).First(&setting).Error
|
err := db.Where("`key` = ?", key).First(&setting).Error
|
||||||
return setting.Value, err
|
return setting.Value, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ func runGitCommand(ch ssh.Channel, gitCmd string, key string, ip string) error {
|
||||||
|
|
||||||
allowUnauthenticated, err := auth.ShouldAllowUnauthenticatedGistAccess(db.AuthInfo{}, true)
|
allowUnauthenticated, err := auth.ShouldAllowUnauthenticatedGistAccess(db.AuthInfo{}, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
errorSsh("Failed to get auth info", err)
|
||||||
return errors.New("internal server error")
|
return errors.New("internal server error")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue