diff --git a/cmd/serve.go b/cmd/serve.go
index 3ac29d7ec3..1d72b5c30f 100644
--- a/cmd/serve.go
+++ b/cmd/serve.go
@@ -258,7 +258,11 @@ func runServ(c *cli.Context) error {
 		}
 	}
 
+	os.Setenv("GITEA_PUSHER_NAME", user.Name)
+
 	uuid := gouuid.NewV4().String()
+	os.Setenv("GITEA_UUID", uuid)
+	// Keep the old env variable name for backward compability
 	os.Setenv("uuid", uuid)
 
 	// Special handle for Windows.
diff --git a/cmd/update.go b/cmd/update.go
index df20c223e9..4bbab9a3af 100644
--- a/cmd/update.go
+++ b/cmd/update.go
@@ -49,7 +49,7 @@ func runUpdate(c *cli.Context) error {
 	}
 
 	task := models.UpdateTask{
-		UUID:        os.Getenv("uuid"),
+		UUID:        os.Getenv("GITEA_UUID"),
 		RefName:     args[0],
 		OldCommitID: args[1],
 		NewCommitID: args[2],