Skip to content

Commit

Permalink
Fix git clone on SSH with MySQL (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomiceli authored Nov 17, 2024
1 parent c1e046f commit 40ff4c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/db/admin_setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (

func GetSetting(key string) (string, error) {
var setting AdminSetting
err := db.Where("key = ?", key).First(&setting).Error
err := db.Where("`key` = ?", key).First(&setting).Error
return setting.Value, err
}

Expand Down
1 change: 1 addition & 0 deletions internal/ssh/git_ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func runGitCommand(ch ssh.Channel, gitCmd string, key string, ip string) error {

allowUnauthenticated, err := auth.ShouldAllowUnauthenticatedGistAccess(db.AuthInfo{}, true)
if err != nil {
errorSsh("Failed to get auth info", err)
return errors.New("internal server error")
}

Expand Down

0 comments on commit 40ff4c7

Please sign in to comment.