diff --git a/modules/setting/repository.go b/modules/setting/repository.go
index a6f0ed8833..a722ea2a0f 100644
--- a/modules/setting/repository.go
+++ b/modules/setting/repository.go
@@ -151,7 +151,7 @@ var (
 		DefaultPrivate:                          RepoCreatingLastUserVisibility,
 		DefaultPushCreatePrivate:                true,
 		MaxCreationLimit:                        -1,
-		PreferredLicenses:                       []string{"Apache License 2.0", "MIT License"},
+		PreferredLicenses:                       []string{"Apache-2.0", "MIT"},
 		DisableHTTPGit:                          false,
 		AccessControlAllowOrigin:                "",
 		UseCompatSSHURI:                         false,