Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sqle/api/controller/v1/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ func getGitAuthMethod(url, username, password string) (transport.AuthMethod, err
if err != nil {
return nil, err
}
if systemVariable.Code != 0 {
if systemVariable.Data.SystemVariableSSHPrimaryKey != "" {
return nil, errors.New(errors.DataNotExist, fmt.Errorf("git ssh private key not found"))
}
publicKeys, err := sshTransport.NewPublicKeys("git", []byte(systemVariable.Data.SystemVariableSSHPrimaryKey), "")
Expand Down Expand Up @@ -550,7 +550,7 @@ func GetSSHPublicKey(c echo.Context) error {
if err != nil {
return controller.JSONBaseErrorReq(c, err)
}
if systemVariable.Code != 0 {
if systemVariable.Data.SystemVariableSSHPrimaryKey == "" {
return c.JSON(http.StatusOK, SSHPublicKeyInfoV1Rsp{
BaseRes: controller.NewBaseReq(nil),
Data: SSHPublicKeyInfo{
Expand Down
2 changes: 1 addition & 1 deletion sqle/server/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func getOperationRecordExpiredHours(entry *logrus.Entry) (operationRecordExpired

operationRecordExpiredHours = dms.DefaultOperationRecordExpiredHours
systemVariables, err := dmsobject.GetSystemVariables(context.TODO(), dms.GetDMSServerAddress())
if err != nil || systemVariables.Code != 0 {
if err != nil {
entry.Warnf("get system variables failed, err: %s", err.Error())
return operationRecordExpiredHours
}
Expand Down
Loading